Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR: Fix error when plugins required for tabification are unavailable (Layout) #22199

Merged
merged 2 commits into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion spyder/plugins/breakpoints/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class Breakpoints(SpyderDockablePlugin):
NAME = 'breakpoints'
REQUIRES = [Plugins.Editor]
OPTIONAL = [Plugins.MainMenu]
TABIFY = [Plugins.Help]
TABIFY = [Plugins.VariableExplorer, Plugins.Help]
WIDGET_CLASS = BreakpointWidget
CONF_SECTION = NAME
CONF_FILE = False
Expand Down
9 changes: 8 additions & 1 deletion spyder/plugins/layout/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -1058,7 +1058,14 @@ def tabify_helper(plugin, next_to_plugins):
return False

# Get the actual plugins from their names
next_to_plugins = [self.get_plugin(p) for p in next_to_plugins]
next_to_plugins = [
self.get_plugin(p, error=False) for p in next_to_plugins
]

# Remove not available plugins from next_to_plugins
next_to_plugins = [
p for p in next_to_plugins if p is not None
]

if plugin.get_conf('first_time', True):
# This tabifies external and internal plugins that are loaded for
Expand Down
2 changes: 1 addition & 1 deletion spyder/plugins/onlinehelp/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class OnlineHelp(SpyderDockablePlugin):
"""

NAME = 'onlinehelp'
TABIFY = Plugins.Help
TABIFY = [Plugins.VariableExplorer, Plugins.Help]
CONF_SECTION = NAME
CONF_FILE = False
WIDGET_CLASS = PydocBrowser
Expand Down
2 changes: 1 addition & 1 deletion spyder/plugins/profiler/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class Profiler(SpyderDockablePlugin):
NAME = 'profiler'
REQUIRES = [Plugins.Preferences, Plugins.Editor]
OPTIONAL = [Plugins.MainMenu]
TABIFY = [Plugins.Help]
TABIFY = [Plugins.VariableExplorer, Plugins.Help]
WIDGET_CLASS = ProfilerWidget
CONF_SECTION = NAME
CONF_WIDGET_CLASS = ProfilerConfigPage
Expand Down
2 changes: 1 addition & 1 deletion spyder/plugins/pylint/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class Pylint(SpyderDockablePlugin):
CONF_WIDGET_CLASS = PylintConfigPage
REQUIRES = [Plugins.Preferences, Plugins.Editor]
OPTIONAL = [Plugins.MainMenu, Plugins.Projects]
TABIFY = [Plugins.Help]
TABIFY = [Plugins.VariableExplorer, Plugins.Help]
CONF_FILE = False
DISABLE_ACTIONS_WHEN_HIDDEN = False

Expand Down
Loading