Skip to content

Commit

Permalink
API: Fix several block comments so they're displayed in Spyder's Outline
Browse files Browse the repository at this point in the history
[ci skip]
  • Loading branch information
ccordoba12 committed Nov 25, 2024
1 parent 82f4cca commit 615f1ac
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions spyder/api/plugins/new_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,8 @@ class SpyderPluginV2(QObject, SpyderActionMixin, SpyderConfigurationObserver,
The window state.
"""

# --- Private attributes -------------------------------------------------
# ------------------------------------------------------------------------
# ---- Private attributes
# -------------------------------------------------------------------------
# Define configuration name map for plugin to split configuration
# among several files. See spyder/config/main.py
_CONF_NAME_MAP = None
Expand Down Expand Up @@ -361,8 +361,8 @@ def __init__(self, parent, configuration=None):
plugin_path = osp.join(self.get_path(), self.IMG_PATH)
IMAGE_PATH_MANAGER.add_image_path(plugin_path)

# --- Private methods ----------------------------------------------------
# ------------------------------------------------------------------------
# ---- Private methods
# -------------------------------------------------------------------------
def _register(self, omit_conf=False):
"""
Setup and register plugin in Spyder's main window and connect it to
Expand Down Expand Up @@ -397,8 +397,8 @@ def _unregister(self):
self.is_compatible = None
self.is_registered = False

# --- API: available methods ---------------------------------------------
# ------------------------------------------------------------------------
# ---- API: available methods
# -------------------------------------------------------------------------
def get_path(self):
"""
Return the plugin's system path.
Expand Down Expand Up @@ -765,8 +765,8 @@ def get_command_line_options(self):
sys_argv = [sys.argv[0]] # Avoid options passed to pytest
return get_options(sys_argv)[0]

# --- API: Mandatory methods to define -----------------------------------
# ------------------------------------------------------------------------
# ---- API: Mandatory methods to define
# -------------------------------------------------------------------------
@staticmethod
def get_name():
"""
Expand Down Expand Up @@ -832,8 +832,8 @@ def on_initialize(self):
f'The plugin {type(self)} is missing an implementation of '
'on_initialize')

# --- API: Optional methods to override ----------------------------------
# ------------------------------------------------------------------------
# ---- API: Optional methods to override
# -------------------------------------------------------------------------
@staticmethod
def check_compatibility():
"""
Expand Down Expand Up @@ -952,14 +952,14 @@ class SpyderDockablePlugin(SpyderPluginV2):
"""
A Spyder plugin to enhance functionality with a dockable widget.
"""
# --- API: Mandatory attributes ------------------------------------------
# ------------------------------------------------------------------------
# ---- API: Mandatory attributes
# -------------------------------------------------------------------------
# This is the main widget of the dockable plugin.
# It needs to be a subclass of PluginMainWidget.
WIDGET_CLASS = None

# --- API: Optional attributes -------------------------------------------
# ------------------------------------------------------------------------
# ---- API: Optional attributes
# -------------------------------------------------------------------------
# Define a list of plugins next to which we want to to tabify this plugin.
# Example: ['Plugins.Editor']
TABIFY = []
Expand All @@ -972,8 +972,8 @@ class SpyderDockablePlugin(SpyderPluginV2):
# the action to switch is called a second time.
RAISE_AND_FOCUS = False

# --- API: Available signals ---------------------------------------------
# ------------------------------------------------------------------------
# ---- API: Available signals
# -------------------------------------------------------------------------
sig_focus_changed = Signal()
"""
This signal is emitted to inform the focus of this plugin has changed.
Expand Down Expand Up @@ -1010,8 +1010,8 @@ class SpyderDockablePlugin(SpyderPluginV2):
needs its ancestor to be updated.
"""

# --- Private methods ----------------------------------------------------
# ------------------------------------------------------------------------
# ---- Private methods
# -------------------------------------------------------------------------
def __init__(self, parent, configuration):
if not issubclass(self.WIDGET_CLASS, PluginMainWidget):
raise SpyderAPIError(
Expand Down Expand Up @@ -1053,8 +1053,8 @@ def __init__(self, parent, configuration):
widget.sig_update_ancestor_requested.connect(
self.sig_update_ancestor_requested)

# --- API: available methods ---------------------------------------------
# ------------------------------------------------------------------------
# ---- API: available methods
# -------------------------------------------------------------------------
def before_long_process(self, message):
"""
Show a message in main window's status bar, change the mouse pointer
Expand Down Expand Up @@ -1116,8 +1116,8 @@ def set_ancestor(self, ancestor_widget):
"""
self.get_widget().set_ancestor(ancestor_widget)

# --- Convenience methods from the widget exposed on the plugin
# ------------------------------------------------------------------------
# ---- Convenience methods from the widget exposed on the plugin
# -------------------------------------------------------------------------
@property
def dockwidget(self):
return self.get_widget().dockwidget
Expand Down

0 comments on commit 615f1ac

Please sign in to comment.