Skip to content

Commit

Permalink
Manually fix up overlong docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
mdickinson committed Mar 23, 2023
1 parent dac6c36 commit 8dbce11
Show file tree
Hide file tree
Showing 13 changed files with 72 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ class IModel3d(Interface):


class IModel3dIPlottable2dMixin(HasTraits):
"""Mixin class to facilitate defining a IModel3d -> IPlottable2D adapter."""
"""
Mixin class to facilitate defining a IModel3d -> IPlottable2D adapter.
"""

#### 'Adapter' interface ##################################################

Expand Down
4 changes: 3 additions & 1 deletion envisage/plugins/tasks/python_shell_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,9 @@ def start(self):
logger.debug("started python shell plugin")

def _contributed_bindings_default(self):
"""By default, expose the Envisage application object to the namespace"""
"""
By default, expose the Envisage application object to the namespace
"""
return [{"application": self.application}]

def _tasks_default(self):
Expand Down
4 changes: 3 additions & 1 deletion envisage/tests/test_composite_plugin_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,9 @@ def _plugin_count(self, plugin_manager):
return count

def _test_start_and_stop(self, plugin_manager, expected):
"""Make sure the plugin manager starts and stops the expected plugins."""
"""
Make sure the plugin manager starts and stops the expected plugins.
"""

# Make sure the plugin manager found only the required plugins.
self.assertEqual(expected, [plugin.id for plugin in plugin_manager])
Expand Down
4 changes: 3 additions & 1 deletion envisage/tests/test_egg_basket_plugin_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,9 @@ def on_broken_distribution(dist, exc):
#### Private protocol #####################################################

def _test_start_and_stop(self, plugin_manager, expected):
"""Make sure the plugin manager starts and stops the expected plugins."""
"""
Make sure the plugin manager starts and stops the expected plugins.
"""

# Make sure the plugin manager found only the required plugins.
self.assertEqual(expected, [plugin.id for plugin in plugin_manager])
Expand Down
4 changes: 3 additions & 1 deletion envisage/tests/test_egg_plugin_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,9 @@ def test_uses_global_working_set_by_default(self):
###########################################################################

def _test_start_and_stop(self, plugin_manager, expected):
"""Make sure the plugin manager starts and stops the expected plugins."""
"""
Make sure the plugin manager starts and stops the expected plugins.
"""

# Make sure the plugin manager found only the required plugins.
self.assertEqual(expected, [plugin.id for plugin in plugin_manager])
Expand Down
4 changes: 3 additions & 1 deletion envisage/tests/test_extension_point_changed.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,9 @@ def test_remove_plugin(self):
self.assertEqual(0, event.new.index)

def test_extension_point_change_event_str_representation(self):
"""test string representation of the ExtensionPointChangedEvent class"""
"""
test string representation of the ExtensionPointChangedEvent class
"""
desired_repr = (
"ExtensionPointChangedEvent(extension_point_id={}, "
"index=0, removed=[], added=[])"
Expand Down
4 changes: 3 additions & 1 deletion envisage/tests/test_package_plugin_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,9 @@ def test_reflect_changes_to_the_plugin_path(self):
#### Private protocol #####################################################

def _test_start_and_stop(self, plugin_manager, expected):
"""Make sure the plugin manager starts and stops the expected plugins."""
"""
Make sure the plugin manager starts and stops the expected plugins.
"""

# Make sure the plugin manager found only the required plugins.
self.assertEqual(
Expand Down
4 changes: 3 additions & 1 deletion envisage/tests/test_plugin_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,9 @@ def test_ignore_plugins_matching_a_wildcard_in_the_exclude_list(self):
#### Private protocol #####################################################

def _test_start_and_stop(self, plugin_manager, expected):
"""Make sure the plugin manager starts and stops the expected plugins."""
"""
Make sure the plugin manager starts and stops the expected plugins.
"""

# Make sure the plugin manager found only the required plugins.
self.assertEqual(expected, [plugin.id for plugin in plugin_manager])
Expand Down
44 changes: 33 additions & 11 deletions envisage/tests/test_provider_extension_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ def get_extension_points(self):
return [ExtensionPoint(List, "x")]

def get_extensions(self, extension_point):
"""Return the provider's contributions to an extension point."""
"""
Return the provider's contributions to an extension point.
"""

if extension_point == "x":
extensions = [42, 43]
Expand All @@ -66,7 +68,9 @@ class ProviderB(ExtensionProvider):
"""An extension provider."""

def get_extensions(self, extension_point):
"""Return the provider's contributions to an extension point."""
"""
Return the provider's contributions to an extension point.
"""

if extension_point == "x":
extensions = [44, 45, 46]
Expand Down Expand Up @@ -111,7 +115,9 @@ def get_extension_points(self):
return [ExtensionPoint(List, "my.ep")]

def get_extensions(self, extension_point_id):
"""Return the provider's contributions to an extension point."""
"""
Return the provider's contributions to an extension point.
"""

if extension_point_id == "my.ep":
return self.x
Expand Down Expand Up @@ -141,7 +147,9 @@ class ProviderB(ExtensionProvider):
x = List(Int)

def get_extensions(self, extension_point_id):
"""Return the provider's contributions to an extension point."""
"""
Return the provider's contributions to an extension point.
"""

if extension_point_id == "my.ep":
return self.x
Expand Down Expand Up @@ -246,7 +254,9 @@ def get_extension_points(self):
return [ExtensionPoint(List, "x")]

def get_extensions(self, extension_point):
"""Return the provider's contributions to an extension point."""
"""
Return the provider's contributions to an extension point.
"""

if extension_point == "x":
return [42]
Expand Down Expand Up @@ -288,7 +298,9 @@ class ProviderB(ExtensionProvider):
"""An extension provider."""

def get_extensions(self, extension_point):
"""Return the provider's contributions to an extension point."""
"""
Return the provider's contributions to an extension point.
"""

if extension_point == "x":
extensions = [43, 44]
Expand Down Expand Up @@ -349,7 +361,9 @@ def get_extension_points(self):
return [ExtensionPoint(List, "x"), ExtensionPoint(List, "y")]

def get_extensions(self, extension_point):
"""Return the provider's contributions to an extension point."""
"""
Return the provider's contributions to an extension point.
"""

if extension_point == "x":
return [42]
Expand All @@ -370,7 +384,9 @@ class ProviderB(ExtensionProvider):
"""An extension provider."""

def get_extensions(self, extension_point):
"""Return the provider's contributions to an extension point."""
"""
Return the provider's contributions to an extension point.
"""

if extension_point == "x":
extensions = [43, 44]
Expand Down Expand Up @@ -447,7 +463,9 @@ def get_extension_points(self):
return [ExtensionPoint(List, "x"), ExtensionPoint(List, "y")]

def get_extensions(self, extension_point):
"""Return the provider's contributions to an extension point."""
"""
Return the provider's contributions to an extension point.
"""

return []

Expand Down Expand Up @@ -523,12 +541,16 @@ class ProviderA(ExtensionProvider):
"""An extension provider."""

def get_extension_points(self):
"""Return the extension points offered by the provider."""
"""
Return the extension points offered by the provider.
"""

return [ExtensionPoint(List, "x")]

def get_extensions(self, extension_point):
"""Return the provider's contributions to an extension point."""
"""
Return the provider's contributions to an extension point.
"""

if extension_point == "x":
extensions = [42, 43]
Expand Down
4 changes: 3 additions & 1 deletion envisage/ui/tasks/action/task_window_toggle_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ def _window_deactivated(self):


class TaskWindowToggleGroup(Group):
"""A Group for toggling the activation state of an application's windows."""
"""
A Group for toggling the activation state of an application's windows.
"""

#### 'Group' interface ####################################################

Expand Down
8 changes: 6 additions & 2 deletions envisage/ui/tasks/preferences_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ class PreferencesDialog(Handler):
###########################################################################

def select_pane(self, pane_id):
"""Find and activate the notebook tab that contains the given pane id."""
"""
Find and activate the notebook tab that contains the given pane id.
"""
for tab in self._tabs:
for pane in tab.panes:
if pane.id == pane_id:
Expand Down Expand Up @@ -116,7 +118,9 @@ def apply(self, info=None):
pane.apply()

def close(self, info, is_ok):
"""Handles the user attempting to close a dialog-based user interface."""
"""
Handles the user attempting to close a dialog-based user interface.
"""
if is_ok:
self.apply()
return super().close(info, is_ok)
Expand Down
4 changes: 3 additions & 1 deletion envisage/ui/tasks/preferences_pane.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ def apply(self, info=None):
self.model.copy_traits(self._model, trait_names)

def close(self, info, is_ok):
"""Handles the user attempting to close a dialog-based user interface."""
"""
Handles the user attempting to close a dialog-based user interface.
"""
if is_ok:
self.apply()
return super().close(info, is_ok)
4 changes: 3 additions & 1 deletion envisage/ui/workbench/workbench_action_manager_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@


class WorkbenchActionManagerBuilder(AbstractActionManagerBuilder):
"""The action manager builder used to build the workbench menu/tool bars."""
"""
The action manager builder used to build the workbench menu/tool bars.
"""

#### 'WorkbenchActionManagerBuilder' interface ############################

Expand Down

0 comments on commit 8dbce11

Please sign in to comment.