From 29668db9bb603175ebb9b98b8fe548660feabb7e Mon Sep 17 00:00:00 2001 From: Maria Camila Remolina Gutierrez Date: Tue, 6 Dec 2016 20:15:46 -0500 Subject: [PATCH 1/9] now None is not used --- spyder/plugins/editor.py | 43 +++++++++++++++++++++------------------ spyder/utils/qthelpers.py | 4 ++++ 2 files changed, 27 insertions(+), 20 deletions(-) diff --git a/spyder/plugins/editor.py b/spyder/plugins/editor.py index 9ce757ea22f..51450f7389c 100644 --- a/spyder/plugins/editor.py +++ b/spyder/plugins/editor.py @@ -38,7 +38,7 @@ from spyder.utils import codeanalysis, encoding, programs, sourcecode from spyder.utils import icon_manager as ima from spyder.utils.introspection.manager import IntrospectionManager -from spyder.utils.qthelpers import add_actions, create_action +from spyder.utils.qthelpers import add_actions, create_action, get_menu_separator from spyder.widgets.findreplace import FindReplace from spyder.widgets.editor import (EditorMainWindow, EditorSplitter, EditorStack, Printer) @@ -973,25 +973,27 @@ def get_plugin_actions(self): # ---- File menu/toolbar construction ---- self.recent_file_menu = QMenu(_("Open &recent"), self) self.recent_file_menu.aboutToShow.connect(self.update_recent_file_menu) - + + menu_separator = get_menu_separator() + file_menu_actions = [self.new_action, - None, + menu_separator, self.open_action, self.recent_file_menu, - None, - None, + menu_separator, + menu_separator, self.save_action, self.save_all_action, save_as_action, self.file_switcher_action, self.revert_action, - None, + menu_separator, print_preview_action, self.print_action, - None, + menu_separator, self.close_action, self.close_all_action, - None] + menu_separator] self.main.file_menu_actions += file_menu_actions file_toolbar_actions = [self.new_action, self.open_action, @@ -1013,7 +1015,7 @@ def get_plugin_actions(self): blockcomment_action, unblockcomment_action, self.indent_action, self.unindent_action, self.text_uppercase_action, self.text_lowercase_action] - self.main.edit_menu_actions += [None]+self.edit_menu_actions + self.main.edit_menu_actions += [menu_separator]+self.edit_menu_actions edit_toolbar_actions = [self.toggle_comment_action, self.unindent_action, self.indent_action] self.main.edit_toolbar_actions += edit_toolbar_actions @@ -1025,8 +1027,9 @@ def get_plugin_actions(self): # ---- Run menu/toolbar construction ---- run_menu_actions = [run_action, run_cell_action, - run_cell_advance_action, None, run_selected_action, - re_run_action, configure_action, None] + run_cell_advance_action, menu_separator, + run_selected_action, re_run_action, configure_action, + menu_separator] self.main.run_menu_actions += run_menu_actions run_toolbar_actions = [run_action, run_cell_action, run_cell_advance_action, re_run_action, @@ -1043,12 +1046,12 @@ def get_plugin_actions(self): debug_return_action, debug_continue_action, debug_exit_action, - None, + menu_separator, set_clear_breakpoint_action, set_cond_breakpoint_action, clear_all_breakpoints_action, 'list_breakpoints', - None, + menu_separator, self.winpdb_action] self.main.debug_menu_actions += debug_menu_actions debug_toolbar_actions = [debug_action, debug_next_action, @@ -1061,12 +1064,12 @@ def get_plugin_actions(self): self.showblanks_action, trailingspaces_action, fixindentation_action, - None, + menu_separator, self.todo_list_action, self.warning_list_action, self.previous_warning_action, self.next_warning_action, - None, + menu_separator, self.previous_edit_cursor_action, self.previous_cursor_action, self.next_cursor_action] @@ -1076,17 +1079,17 @@ def get_plugin_actions(self): self.warning_list_action, self.previous_warning_action, self.next_warning_action, - None, + menu_separator, self.previous_edit_cursor_action, self.previous_cursor_action, self.next_cursor_action] self.main.source_toolbar_actions += source_toolbar_actions # ---- Dock widget and file dependent actions ---- - self.dock_toolbar_actions = file_toolbar_actions + [None] + \ - source_toolbar_actions + [None] + \ - run_toolbar_actions + [None] + \ - debug_toolbar_actions + [None] + \ + self.dock_toolbar_actions = file_toolbar_actions + [menu_separator] + \ + source_toolbar_actions + [menu_separator] + \ + run_toolbar_actions + [menu_separator] + \ + debug_toolbar_actions + [menu_separator] + \ edit_toolbar_actions self.pythonfile_dependent_actions = [run_action, configure_action, set_clear_breakpoint_action, set_cond_breakpoint_action, diff --git a/spyder/utils/qthelpers.py b/spyder/utils/qthelpers.py index 2c2d1837c6c..922646900ef 100644 --- a/spyder/utils/qthelpers.py +++ b/spyder/utils/qthelpers.py @@ -499,6 +499,10 @@ def show_std_icons(): dialog.show() sys.exit(app.exec_()) + +def get_menu_separator(): + return None + if __name__ == "__main__": show_std_icons() From a066c7e5a75294b1a58417b1d8e375359266bf7f Mon Sep 17 00:00:00 2001 From: Maria Camila Remolina Gutierrez Date: Fri, 9 Dec 2016 08:23:40 -0500 Subject: [PATCH 2/9] found and replaced all the None / menu separators --- spyder/.spyproject/codestyle.ini | 6 +++++ spyder/.spyproject/encoding.ini | 6 +++++ spyder/.spyproject/vcs.ini | 7 ++++++ spyder/.spyproject/workspace.ini | 10 ++++++++ spyder/app/mainwindow.py | 18 +++++++------- spyder/plugins/editor.py | 40 +++++++++++++++----------------- spyder/plugins/findinfiles.py | 6 ++--- spyder/plugins/ipythonconsole.py | 4 ++-- spyder/plugins/projects.py | 6 ++--- spyder/utils/qthelpers.py | 2 +- spyder_pylint/pylint.py | 4 ++-- 11 files changed, 68 insertions(+), 41 deletions(-) create mode 100644 spyder/.spyproject/codestyle.ini create mode 100644 spyder/.spyproject/encoding.ini create mode 100644 spyder/.spyproject/vcs.ini create mode 100644 spyder/.spyproject/workspace.ini diff --git a/spyder/.spyproject/codestyle.ini b/spyder/.spyproject/codestyle.ini new file mode 100644 index 00000000000..b827aa56ce6 --- /dev/null +++ b/spyder/.spyproject/codestyle.ini @@ -0,0 +1,6 @@ +[codestyle] +indentation = True + +[main] +version = 0.1.0 + diff --git a/spyder/.spyproject/encoding.ini b/spyder/.spyproject/encoding.ini new file mode 100644 index 00000000000..d1c1d171295 --- /dev/null +++ b/spyder/.spyproject/encoding.ini @@ -0,0 +1,6 @@ +[encoding] +text_encoding = utf-8 + +[main] +version = 0.1.0 + diff --git a/spyder/.spyproject/vcs.ini b/spyder/.spyproject/vcs.ini new file mode 100644 index 00000000000..8a96baecf46 --- /dev/null +++ b/spyder/.spyproject/vcs.ini @@ -0,0 +1,7 @@ +[vcs] +version_control_system = +use_version_control = False + +[main] +version = 0.1.0 + diff --git a/spyder/.spyproject/workspace.ini b/spyder/.spyproject/workspace.ini new file mode 100644 index 00000000000..12e9f6ea149 --- /dev/null +++ b/spyder/.spyproject/workspace.ini @@ -0,0 +1,10 @@ +[workspace] +save_non_project_files = False +restore_data_on_startup = True +save_data_on_exit = True +save_history = True + +[main] +version = 0.1.0 +recent_files = ['C:\\Users\\MariaCamila\\.spyder-py3\\temp.py'] + diff --git a/spyder/app/mainwindow.py b/spyder/app/mainwindow.py index f418c077cef..090eaa5f9c0 100644 --- a/spyder/app/mainwindow.py +++ b/spyder/app/mainwindow.py @@ -109,7 +109,7 @@ # Create our QApplication instance here because it's needed to render the # splash screen created below #============================================================================== -from spyder.utils.qthelpers import qapplication +from spyder.utils.qthelpers import qapplication, menu_separator MAIN_APP = qapplication() @@ -659,7 +659,7 @@ def create_edit_action(text, tr_text, icon): "(i.e. for all sessions)"), triggered=self.win_env) self.tools_menu_actions.append(winenv_action) - self.tools_menu_actions += [reset_spyder_action, None, + self.tools_menu_actions += [reset_spyder_action, menu_separator(), update_modules_action] # External Tools submenu @@ -950,9 +950,9 @@ def trigger(i=i, self=self): # closure needed! self.tours_menu = None self.help_menu_actions = [doc_action, tut_action, self.tours_menu, - None, report_action, dep_action, + menu_separator(), report_action, dep_action, self.check_updates_action, support_action, - None] + menu_separator()] # Python documentation if get_python_doc_path() is not None: pydoc_act = create_action(self, _("Python documentation"), @@ -1021,7 +1021,7 @@ def add_ipm_action(text, path): _("About %s...") % "Spyder", icon=ima.icon('MessageBoxInformation'), triggered=self.about) - self.help_menu_actions += [None, about_action] + self.help_menu_actions += [menu_separator(), about_action] # Status bar widgets from spyder.widgets.status import MemoryStatus, CPUStatus @@ -1052,7 +1052,7 @@ def add_ipm_action(text, path): add_actions(self.view_menu, (self.lock_dockwidgets_action, self.close_dockwidget_action, self.maximize_action, - None)) + menu_separator())) self.show_toolbars_action = create_action(self, _("Show toolbars"), triggered=self.show_toolbars, @@ -1061,18 +1061,18 @@ def add_ipm_action(text, path): "Show toolbars") self.view_menu.addMenu(self.toolbars_menu) self.view_menu.addAction(self.show_toolbars_action) - add_actions(self.view_menu, (None, + add_actions(self.view_menu, (menu_separator(), self.quick_layout_menu, self.toggle_previous_layout_action, self.toggle_next_layout_action, - None, + menu_separator(), self.fullscreen_action)) if set_attached_console_visible is not None: cmd_act = create_action(self, _("Attached console window (debugging)"), toggled=set_attached_console_visible) cmd_act.setChecked(is_attached_console_visible()) - add_actions(self.view_menu, (None, cmd_act)) + add_actions(self.view_menu, (menu_separator(), cmd_act)) # Adding external tools action to "Tools" menu if self.external_tools_menu_actions: diff --git a/spyder/plugins/editor.py b/spyder/plugins/editor.py index 51450f7389c..41a79dd9425 100644 --- a/spyder/plugins/editor.py +++ b/spyder/plugins/editor.py @@ -38,7 +38,7 @@ from spyder.utils import codeanalysis, encoding, programs, sourcecode from spyder.utils import icon_manager as ima from spyder.utils.introspection.manager import IntrospectionManager -from spyder.utils.qthelpers import add_actions, create_action, get_menu_separator +from spyder.utils.qthelpers import add_actions, create_action, menu_separator from spyder.widgets.findreplace import FindReplace from spyder.widgets.editor import (EditorMainWindow, EditorSplitter, EditorStack, Printer) @@ -974,26 +974,24 @@ def get_plugin_actions(self): self.recent_file_menu = QMenu(_("Open &recent"), self) self.recent_file_menu.aboutToShow.connect(self.update_recent_file_menu) - menu_separator = get_menu_separator() - file_menu_actions = [self.new_action, - menu_separator, + menu_separator(), self.open_action, self.recent_file_menu, - menu_separator, - menu_separator, + menu_separator(), + menu_separator(), self.save_action, self.save_all_action, save_as_action, self.file_switcher_action, self.revert_action, - menu_separator, + menu_separator(), print_preview_action, self.print_action, - menu_separator, + menu_separator(), self.close_action, self.close_all_action, - menu_separator] + menu_separator()] self.main.file_menu_actions += file_menu_actions file_toolbar_actions = [self.new_action, self.open_action, @@ -1015,7 +1013,7 @@ def get_plugin_actions(self): blockcomment_action, unblockcomment_action, self.indent_action, self.unindent_action, self.text_uppercase_action, self.text_lowercase_action] - self.main.edit_menu_actions += [menu_separator]+self.edit_menu_actions + self.main.edit_menu_actions += [menu_separator()]+self.edit_menu_actions edit_toolbar_actions = [self.toggle_comment_action, self.unindent_action, self.indent_action] self.main.edit_toolbar_actions += edit_toolbar_actions @@ -1027,9 +1025,9 @@ def get_plugin_actions(self): # ---- Run menu/toolbar construction ---- run_menu_actions = [run_action, run_cell_action, - run_cell_advance_action, menu_separator, + run_cell_advance_action, menu_separator(), run_selected_action, re_run_action, configure_action, - menu_separator] + menu_separator()] self.main.run_menu_actions += run_menu_actions run_toolbar_actions = [run_action, run_cell_action, run_cell_advance_action, re_run_action, @@ -1046,12 +1044,12 @@ def get_plugin_actions(self): debug_return_action, debug_continue_action, debug_exit_action, - menu_separator, + menu_separator(), set_clear_breakpoint_action, set_cond_breakpoint_action, clear_all_breakpoints_action, 'list_breakpoints', - menu_separator, + menu_separator(), self.winpdb_action] self.main.debug_menu_actions += debug_menu_actions debug_toolbar_actions = [debug_action, debug_next_action, @@ -1064,12 +1062,12 @@ def get_plugin_actions(self): self.showblanks_action, trailingspaces_action, fixindentation_action, - menu_separator, + menu_separator(), self.todo_list_action, self.warning_list_action, self.previous_warning_action, self.next_warning_action, - menu_separator, + menu_separator(), self.previous_edit_cursor_action, self.previous_cursor_action, self.next_cursor_action] @@ -1079,17 +1077,17 @@ def get_plugin_actions(self): self.warning_list_action, self.previous_warning_action, self.next_warning_action, - menu_separator, + menu_separator(), self.previous_edit_cursor_action, self.previous_cursor_action, self.next_cursor_action] self.main.source_toolbar_actions += source_toolbar_actions # ---- Dock widget and file dependent actions ---- - self.dock_toolbar_actions = file_toolbar_actions + [menu_separator] + \ - source_toolbar_actions + [menu_separator] + \ - run_toolbar_actions + [menu_separator] + \ - debug_toolbar_actions + [menu_separator] + \ + self.dock_toolbar_actions = file_toolbar_actions + [menu_separator()] + \ + source_toolbar_actions + [menu_separator()] + \ + run_toolbar_actions + [menu_separator()] + \ + debug_toolbar_actions + [menu_separator()] + \ edit_toolbar_actions self.pythonfile_dependent_actions = [run_action, configure_action, set_clear_breakpoint_action, set_cond_breakpoint_action, diff --git a/spyder/plugins/findinfiles.py b/spyder/plugins/findinfiles.py index b892e00c854..8b1459980cf 100644 --- a/spyder/plugins/findinfiles.py +++ b/spyder/plugins/findinfiles.py @@ -23,7 +23,7 @@ from spyder.config.utils import get_edit_extensions from spyder.py3compat import getcwd from spyder.utils import icon_manager as ima -from spyder.utils.qthelpers import create_action +from spyder.utils.qthelpers import create_action, menu_separator from spyder.widgets.findinfiles import FindInFilesWidget from spyder.plugins import SpyderPluginMixin @@ -150,8 +150,8 @@ def register_plugin(self): triggered=self.findinfiles_callback, tip=_("Search text in multiple files")) - self.main.search_menu_actions += [None, findinfiles_action] - self.main.search_toolbar_actions += [None, findinfiles_action] + self.main.search_menu_actions += [menu_separator(), findinfiles_action] + self.main.search_toolbar_actions += [menu_separator(), findinfiles_action] def refresh_plugin(self): """Refresh widget""" diff --git a/spyder/plugins/ipythonconsole.py b/spyder/plugins/ipythonconsole.py index c7018b1a8d6..2307eb53a0c 100644 --- a/spyder/plugins/ipythonconsole.py +++ b/spyder/plugins/ipythonconsole.py @@ -50,7 +50,7 @@ from spyder.plugins.configdialog import PluginConfigPage from spyder.py3compat import (iteritems, PY2, to_binary_string, to_text_string) -from spyder.utils.qthelpers import create_action +from spyder.utils.qthelpers import create_action, menu_separator from spyder.utils import icon_manager as ima from spyder.utils import encoding, programs from spyder.utils.misc import (add_pathlist_to_PYTHONPATH, get_error_match, @@ -751,7 +751,7 @@ def get_plugin_actions(self): # Add the action to the 'Consoles' menu on the main window main_consoles_menu = self.main.consoles_menu_actions main_consoles_menu.insert(0, main_create_client_action) - main_consoles_menu += [None, connect_to_kernel_action] + main_consoles_menu += [menu_separator(), connect_to_kernel_action] # Plugin actions self.menu_actions = [create_client_action, connect_to_kernel_action] diff --git a/spyder/plugins/projects.py b/spyder/plugins/projects.py index a790b282410..958c9316ef8 100644 --- a/spyder/plugins/projects.py +++ b/spyder/plugins/projects.py @@ -24,7 +24,7 @@ from spyder.plugins import SpyderPluginMixin from spyder.py3compat import is_text_string, getcwd from spyder.utils import icon_manager as ima -from spyder.utils.qthelpers import add_actions, create_action +from spyder.utils.qthelpers import add_actions, create_action, menu_separator from spyder.widgets.projects.explorer import ProjectExplorerWidget from spyder.widgets.projects.projectdialog import ProjectDialog from spyder.widgets.projects import EmptyProject @@ -106,11 +106,11 @@ def get_plugin_actions(self): explorer_action = self.toggle_view_action self.main.projects_menu_actions += [self.new_project_action, - None, + menu_separator(), self.open_project_action, self.close_project_action, self.delete_project_action, - None, + menu_separator(), self.recent_project_menu, explorer_action] diff --git a/spyder/utils/qthelpers.py b/spyder/utils/qthelpers.py index 922646900ef..f7704aded1f 100644 --- a/spyder/utils/qthelpers.py +++ b/spyder/utils/qthelpers.py @@ -500,7 +500,7 @@ def show_std_icons(): sys.exit(app.exec_()) -def get_menu_separator(): +def menu_separator(): return None diff --git a/spyder_pylint/pylint.py b/spyder_pylint/pylint.py index a5e2e050713..1f9c73ec79f 100644 --- a/spyder_pylint/pylint.py +++ b/spyder_pylint/pylint.py @@ -23,7 +23,7 @@ from spyder.plugins import SpyderPluginMixin from spyder.plugins.configdialog import PluginConfigPage from spyder.utils import icon_manager as ima -from spyder.utils.qthelpers import create_action +from spyder.utils.qthelpers import create_action, menu_separator from .widgets.pylintgui import (PYLINT_PATH, PylintWidget) @@ -136,7 +136,7 @@ def register_plugin(self): self.register_shortcut(pylint_act, context="Pylint", name="Run analysis") - self.main.source_menu_actions += [None, pylint_act] + self.main.source_menu_actions += [menu_separator(), pylint_act] self.main.editor.pythonfile_dependent_actions += [pylint_act] def refresh_plugin(self): From 6a049a233fabd2b80eb7b58c9e6ad37e4761eef9 Mon Sep 17 00:00:00 2001 From: Maria Camila Remolina Gutierrez Date: Fri, 9 Dec 2016 08:31:38 -0500 Subject: [PATCH 3/9] removing spyproject files --- spyder/.spyproject/codestyle.ini | 6 ------ spyder/.spyproject/encoding.ini | 6 ------ spyder/.spyproject/vcs.ini | 7 ------- spyder/.spyproject/workspace.ini | 10 ---------- 4 files changed, 29 deletions(-) delete mode 100644 spyder/.spyproject/codestyle.ini delete mode 100644 spyder/.spyproject/encoding.ini delete mode 100644 spyder/.spyproject/vcs.ini delete mode 100644 spyder/.spyproject/workspace.ini diff --git a/spyder/.spyproject/codestyle.ini b/spyder/.spyproject/codestyle.ini deleted file mode 100644 index b827aa56ce6..00000000000 --- a/spyder/.spyproject/codestyle.ini +++ /dev/null @@ -1,6 +0,0 @@ -[codestyle] -indentation = True - -[main] -version = 0.1.0 - diff --git a/spyder/.spyproject/encoding.ini b/spyder/.spyproject/encoding.ini deleted file mode 100644 index d1c1d171295..00000000000 --- a/spyder/.spyproject/encoding.ini +++ /dev/null @@ -1,6 +0,0 @@ -[encoding] -text_encoding = utf-8 - -[main] -version = 0.1.0 - diff --git a/spyder/.spyproject/vcs.ini b/spyder/.spyproject/vcs.ini deleted file mode 100644 index 8a96baecf46..00000000000 --- a/spyder/.spyproject/vcs.ini +++ /dev/null @@ -1,7 +0,0 @@ -[vcs] -version_control_system = -use_version_control = False - -[main] -version = 0.1.0 - diff --git a/spyder/.spyproject/workspace.ini b/spyder/.spyproject/workspace.ini deleted file mode 100644 index 12e9f6ea149..00000000000 --- a/spyder/.spyproject/workspace.ini +++ /dev/null @@ -1,10 +0,0 @@ -[workspace] -save_non_project_files = False -restore_data_on_startup = True -save_data_on_exit = True -save_history = True - -[main] -version = 0.1.0 -recent_files = ['C:\\Users\\MariaCamila\\.spyder-py3\\temp.py'] - From 35cee5f87c7c5308e6a8f6d741a6764c8dbfd658 Mon Sep 17 00:00:00 2001 From: Maria Camila Remolina Gutierrez Date: Fri, 9 Dec 2016 16:08:29 -0500 Subject: [PATCH 4/9] some style fixes --- spyder/app/mainwindow.py | 6 +++--- spyder/plugins/editor.py | 25 +++++++++++++++---------- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/spyder/app/mainwindow.py b/spyder/app/mainwindow.py index ca0f33305e9..d54a83d4b77 100644 --- a/spyder/app/mainwindow.py +++ b/spyder/app/mainwindow.py @@ -1050,9 +1050,9 @@ def add_ipm_action(text, path): self.view_menu.addMenu(self.plugins_menu) # Panes add_actions(self.view_menu, (self.lock_dockwidgets_action, - self.close_dockwidget_action, - self.maximize_action, - menu_separator())) + self.close_dockwidget_action, + self.maximize_action, + menu_separator())) self.show_toolbars_action = create_action(self, _("Show toolbars"), triggered=self.show_toolbars, diff --git a/spyder/plugins/editor.py b/spyder/plugins/editor.py index 5afa3f73af0..3ba98913305 100644 --- a/spyder/plugins/editor.py +++ b/spyder/plugins/editor.py @@ -983,7 +983,7 @@ def get_plugin_actions(self): # ---- File menu/toolbar construction ---- self.recent_file_menu = QMenu(_("Open &recent"), self) self.recent_file_menu.aboutToShow.connect(self.update_recent_file_menu) - + file_menu_actions = [self.new_action, menu_separator(), self.open_action, @@ -1002,7 +1002,7 @@ def get_plugin_actions(self): menu_separator(), self.close_action, self.close_all_action, - menu_separator()] + menu_separator()] self.main.file_menu_actions += file_menu_actions file_toolbar_actions = [self.new_action, self.open_action, @@ -1023,8 +1023,9 @@ def get_plugin_actions(self): self.edit_menu_actions = [self.toggle_comment_action, blockcomment_action, unblockcomment_action, self.indent_action, self.unindent_action, - self.text_uppercase_action, self.text_lowercase_action] - self.main.edit_menu_actions += [menu_separator()]+self.edit_menu_actions + self.text_uppercase_action, + self.text_lowercase_action] + self.main.edit_menu_actions += [menu_separator()] + self.edit_menu_actions edit_toolbar_actions = [self.toggle_comment_action, self.unindent_action, self.indent_action] self.main.edit_toolbar_actions += edit_toolbar_actions @@ -1036,8 +1037,8 @@ def get_plugin_actions(self): # ---- Run menu/toolbar construction ---- run_menu_actions = [run_action, run_cell_action, - run_cell_advance_action, menu_separator(), - run_selected_action, re_run_action, configure_action, + run_cell_advance_action, menu_separator(), + run_selected_action, re_run_action, configure_action, menu_separator()] self.main.run_menu_actions += run_menu_actions run_toolbar_actions = [run_action, run_cell_action, @@ -1101,10 +1102,14 @@ def get_plugin_actions(self): debug_toolbar_actions + [menu_separator()] + \ edit_toolbar_actions self.pythonfile_dependent_actions = [run_action, configure_action, - set_clear_breakpoint_action, set_cond_breakpoint_action, - debug_action, run_selected_action, run_cell_action, - run_cell_advance_action, blockcomment_action, - unblockcomment_action, self.winpdb_action] + set_clear_breakpoint_action, + set_cond_breakpoint_action, + debug_action, run_selected_action, + run_cell_action, + run_cell_advance_action, + blockcomment_action, + unblockcomment_action, + self.winpdb_action] self.file_dependent_actions = self.pythonfile_dependent_actions + \ [self.save_action, save_as_action, print_preview_action, self.print_action, self.save_all_action, gotoline_action, From d0420dfd51de380af561b1268e172cb636c5343e Mon Sep 17 00:00:00 2001 From: Maria Camila Remolina Gutierrez Date: Fri, 9 Dec 2016 21:00:18 -0500 Subject: [PATCH 5/9] style corrections --- spyder/plugins/editor.py | 18 +++++++++++------- spyder/plugins/findinfiles.py | 3 ++- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/spyder/plugins/editor.py b/spyder/plugins/editor.py index 3ba98913305..8d01e0f18f8 100644 --- a/spyder/plugins/editor.py +++ b/spyder/plugins/editor.py @@ -1023,7 +1023,7 @@ def get_plugin_actions(self): self.edit_menu_actions = [self.toggle_comment_action, blockcomment_action, unblockcomment_action, self.indent_action, self.unindent_action, - self.text_uppercase_action, + self.text_uppercase_action, self.text_lowercase_action] self.main.edit_menu_actions += [menu_separator()] + self.edit_menu_actions edit_toolbar_actions = [self.toggle_comment_action, @@ -1038,8 +1038,8 @@ def get_plugin_actions(self): # ---- Run menu/toolbar construction ---- run_menu_actions = [run_action, run_cell_action, run_cell_advance_action, menu_separator(), - run_selected_action, re_run_action, configure_action, - menu_separator()] + run_selected_action, re_run_action, + configure_action, menu_separator()] self.main.run_menu_actions += run_menu_actions run_toolbar_actions = [run_action, run_cell_action, run_cell_advance_action, re_run_action, @@ -1096,10 +1096,14 @@ def get_plugin_actions(self): self.main.source_toolbar_actions += source_toolbar_actions # ---- Dock widget and file dependent actions ---- - self.dock_toolbar_actions = file_toolbar_actions + [menu_separator()] + \ - source_toolbar_actions + [menu_separator()] + \ - run_toolbar_actions + [menu_separator()] + \ - debug_toolbar_actions + [menu_separator()] + \ + self.dock_toolbar_actions = file_toolbar_actions + \ + [menu_separator()] + \ + source_toolbar_actions + \ + [menu_separator()] + \ + run_toolbar_actions + \ + [menu_separator()] + \ + debug_toolbar_actions + \ + [menu_separator()] + \ edit_toolbar_actions self.pythonfile_dependent_actions = [run_action, configure_action, set_clear_breakpoint_action, diff --git a/spyder/plugins/findinfiles.py b/spyder/plugins/findinfiles.py index 8b1459980cf..68a6ff601c5 100644 --- a/spyder/plugins/findinfiles.py +++ b/spyder/plugins/findinfiles.py @@ -151,7 +151,8 @@ def register_plugin(self): tip=_("Search text in multiple files")) self.main.search_menu_actions += [menu_separator(), findinfiles_action] - self.main.search_toolbar_actions += [menu_separator(), findinfiles_action] + self.main.search_toolbar_actions += [menu_separator(), + findinfiles_action] def refresh_plugin(self): """Refresh widget""" From 35eb19df51e649c9aa4fb96ecfaa250919c0cb31 Mon Sep 17 00:00:00 2001 From: Maria Camila Remolina Gutierrez Date: Fri, 9 Dec 2016 22:21:03 -0500 Subject: [PATCH 6/9] style corrections 2 --- spyder/plugins/editor.py | 20 ++++++++++---------- spyder/plugins/findinfiles.py | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/spyder/plugins/editor.py b/spyder/plugins/editor.py index 8d01e0f18f8..5b6aa4b4a27 100644 --- a/spyder/plugins/editor.py +++ b/spyder/plugins/editor.py @@ -1038,7 +1038,7 @@ def get_plugin_actions(self): # ---- Run menu/toolbar construction ---- run_menu_actions = [run_action, run_cell_action, run_cell_advance_action, menu_separator(), - run_selected_action, re_run_action, + run_selected_action, re_run_action, configure_action, menu_separator()] self.main.run_menu_actions += run_menu_actions run_toolbar_actions = [run_action, run_cell_action, @@ -1096,15 +1096,15 @@ def get_plugin_actions(self): self.main.source_toolbar_actions += source_toolbar_actions # ---- Dock widget and file dependent actions ---- - self.dock_toolbar_actions = file_toolbar_actions + \ - [menu_separator()] + \ - source_toolbar_actions + \ - [menu_separator()] + \ - run_toolbar_actions + \ - [menu_separator()] + \ - debug_toolbar_actions + \ - [menu_separator()] + \ - edit_toolbar_actions + self.dock_toolbar_actions = file_toolbar_actions \ + + [menu_separator()] \ + + source_toolbar_actions \ + + [menu_separator()] \ + + run_toolbar_actions \ + + [menu_separator()] \ + + debug_toolbar_actions \ + + [menu_separator()] \ + + edit_toolbar_actions self.pythonfile_dependent_actions = [run_action, configure_action, set_clear_breakpoint_action, set_cond_breakpoint_action, diff --git a/spyder/plugins/findinfiles.py b/spyder/plugins/findinfiles.py index 68a6ff601c5..df822ac7975 100644 --- a/spyder/plugins/findinfiles.py +++ b/spyder/plugins/findinfiles.py @@ -151,7 +151,7 @@ def register_plugin(self): tip=_("Search text in multiple files")) self.main.search_menu_actions += [menu_separator(), findinfiles_action] - self.main.search_toolbar_actions += [menu_separator(), + self.main.search_toolbar_actions += [menu_separator(), findinfiles_action] def refresh_plugin(self): From 7696fef0f3cfdb7c4fac6c4892b2b1f995eb0cf3 Mon Sep 17 00:00:00 2001 From: Maria Camila Remolina Gutierrez Date: Sat, 10 Dec 2016 15:06:52 -0500 Subject: [PATCH 7/9] style corrections 3 --- spyder/plugins/editor.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/spyder/plugins/editor.py b/spyder/plugins/editor.py index 5b6aa4b4a27..1164d430c66 100644 --- a/spyder/plugins/editor.py +++ b/spyder/plugins/editor.py @@ -1096,15 +1096,15 @@ def get_plugin_actions(self): self.main.source_toolbar_actions += source_toolbar_actions # ---- Dock widget and file dependent actions ---- - self.dock_toolbar_actions = file_toolbar_actions \ - + [menu_separator()] \ - + source_toolbar_actions \ - + [menu_separator()] \ - + run_toolbar_actions \ - + [menu_separator()] \ - + debug_toolbar_actions \ - + [menu_separator()] \ - + edit_toolbar_actions + self.dock_toolbar_actions = (file_toolbar_actions + + [menu_separator()] + + source_toolbar_actions + + [menu_separator()] + + run_toolbar_actions + + [menu_separator()] + + debug_toolbar_actions + + [menu_separator()] + + edit_toolbar_actions) self.pythonfile_dependent_actions = [run_action, configure_action, set_clear_breakpoint_action, set_cond_breakpoint_action, From 04373fbd0ab10045d55b7feea07e1b6e13abfa21 Mon Sep 17 00:00:00 2001 From: Maria Camila Remolina Gutierrez Date: Fri, 9 Dec 2016 16:08:29 -0500 Subject: [PATCH 8/9] some style fixes style corrections style corrections 2 style corrections 3 total style corrections --- spyder/app/mainwindow.py | 6 ++--- spyder/plugins/editor.py | 41 +++++++++++++++++++++-------------- spyder/plugins/findinfiles.py | 3 ++- 3 files changed, 30 insertions(+), 20 deletions(-) diff --git a/spyder/app/mainwindow.py b/spyder/app/mainwindow.py index ca0f33305e9..d54a83d4b77 100644 --- a/spyder/app/mainwindow.py +++ b/spyder/app/mainwindow.py @@ -1050,9 +1050,9 @@ def add_ipm_action(text, path): self.view_menu.addMenu(self.plugins_menu) # Panes add_actions(self.view_menu, (self.lock_dockwidgets_action, - self.close_dockwidget_action, - self.maximize_action, - menu_separator())) + self.close_dockwidget_action, + self.maximize_action, + menu_separator())) self.show_toolbars_action = create_action(self, _("Show toolbars"), triggered=self.show_toolbars, diff --git a/spyder/plugins/editor.py b/spyder/plugins/editor.py index 5afa3f73af0..1164d430c66 100644 --- a/spyder/plugins/editor.py +++ b/spyder/plugins/editor.py @@ -983,7 +983,7 @@ def get_plugin_actions(self): # ---- File menu/toolbar construction ---- self.recent_file_menu = QMenu(_("Open &recent"), self) self.recent_file_menu.aboutToShow.connect(self.update_recent_file_menu) - + file_menu_actions = [self.new_action, menu_separator(), self.open_action, @@ -1002,7 +1002,7 @@ def get_plugin_actions(self): menu_separator(), self.close_action, self.close_all_action, - menu_separator()] + menu_separator()] self.main.file_menu_actions += file_menu_actions file_toolbar_actions = [self.new_action, self.open_action, @@ -1023,8 +1023,9 @@ def get_plugin_actions(self): self.edit_menu_actions = [self.toggle_comment_action, blockcomment_action, unblockcomment_action, self.indent_action, self.unindent_action, - self.text_uppercase_action, self.text_lowercase_action] - self.main.edit_menu_actions += [menu_separator()]+self.edit_menu_actions + self.text_uppercase_action, + self.text_lowercase_action] + self.main.edit_menu_actions += [menu_separator()] + self.edit_menu_actions edit_toolbar_actions = [self.toggle_comment_action, self.unindent_action, self.indent_action] self.main.edit_toolbar_actions += edit_toolbar_actions @@ -1036,9 +1037,9 @@ def get_plugin_actions(self): # ---- Run menu/toolbar construction ---- run_menu_actions = [run_action, run_cell_action, - run_cell_advance_action, menu_separator(), - run_selected_action, re_run_action, configure_action, - menu_separator()] + run_cell_advance_action, menu_separator(), + run_selected_action, re_run_action, + configure_action, menu_separator()] self.main.run_menu_actions += run_menu_actions run_toolbar_actions = [run_action, run_cell_action, run_cell_advance_action, re_run_action, @@ -1095,16 +1096,24 @@ def get_plugin_actions(self): self.main.source_toolbar_actions += source_toolbar_actions # ---- Dock widget and file dependent actions ---- - self.dock_toolbar_actions = file_toolbar_actions + [menu_separator()] + \ - source_toolbar_actions + [menu_separator()] + \ - run_toolbar_actions + [menu_separator()] + \ - debug_toolbar_actions + [menu_separator()] + \ - edit_toolbar_actions + self.dock_toolbar_actions = (file_toolbar_actions + + [menu_separator()] + + source_toolbar_actions + + [menu_separator()] + + run_toolbar_actions + + [menu_separator()] + + debug_toolbar_actions + + [menu_separator()] + + edit_toolbar_actions) self.pythonfile_dependent_actions = [run_action, configure_action, - set_clear_breakpoint_action, set_cond_breakpoint_action, - debug_action, run_selected_action, run_cell_action, - run_cell_advance_action, blockcomment_action, - unblockcomment_action, self.winpdb_action] + set_clear_breakpoint_action, + set_cond_breakpoint_action, + debug_action, run_selected_action, + run_cell_action, + run_cell_advance_action, + blockcomment_action, + unblockcomment_action, + self.winpdb_action] self.file_dependent_actions = self.pythonfile_dependent_actions + \ [self.save_action, save_as_action, print_preview_action, self.print_action, self.save_all_action, gotoline_action, diff --git a/spyder/plugins/findinfiles.py b/spyder/plugins/findinfiles.py index 8b1459980cf..df822ac7975 100644 --- a/spyder/plugins/findinfiles.py +++ b/spyder/plugins/findinfiles.py @@ -151,7 +151,8 @@ def register_plugin(self): tip=_("Search text in multiple files")) self.main.search_menu_actions += [menu_separator(), findinfiles_action] - self.main.search_toolbar_actions += [menu_separator(), findinfiles_action] + self.main.search_toolbar_actions += [menu_separator(), + findinfiles_action] def refresh_plugin(self): """Refresh widget""" From 9bb2bc8a18ea62616193de372b026654a9e60e3f Mon Sep 17 00:00:00 2001 From: Maria Camila Remolina Gutierrez Date: Mon, 12 Dec 2016 20:51:57 -0500 Subject: [PATCH 9/9] replacing menu_separator() for an uppercase constant --- spyder/app/mainwindow.py | 18 +++++++-------- spyder/plugins/editor.py | 38 ++++++++++++++++---------------- spyder/plugins/findinfiles.py | 6 ++--- spyder/plugins/ipythonconsole.py | 4 ++-- spyder/plugins/projects.py | 6 ++--- spyder/utils/qthelpers.py | 3 +-- spyder_pylint/pylint.py | 4 ++-- 7 files changed, 39 insertions(+), 40 deletions(-) diff --git a/spyder/app/mainwindow.py b/spyder/app/mainwindow.py index 3a08b10f598..c2df08b9b98 100644 --- a/spyder/app/mainwindow.py +++ b/spyder/app/mainwindow.py @@ -109,7 +109,7 @@ # Create our QApplication instance here because it's needed to render the # splash screen created below #============================================================================== -from spyder.utils.qthelpers import qapplication, menu_separator +from spyder.utils.qthelpers import qapplication, MENU_SEPARATOR MAIN_APP = qapplication() @@ -659,7 +659,7 @@ def create_edit_action(text, tr_text, icon): "(i.e. for all sessions)"), triggered=self.win_env) self.tools_menu_actions.append(winenv_action) - self.tools_menu_actions += [reset_spyder_action, menu_separator(), + self.tools_menu_actions += [reset_spyder_action, MENU_SEPARATOR, update_modules_action] # External Tools submenu @@ -953,9 +953,9 @@ def trigger(i=i, self=self): # closure needed! self.tours_menu = None self.help_menu_actions = [doc_action, tut_action, self.tours_menu, - menu_separator(), report_action, dep_action, + MENU_SEPARATOR, report_action, dep_action, self.check_updates_action, support_action, - menu_separator()] + MENU_SEPARATOR] # Python documentation if get_python_doc_path() is not None: pydoc_act = create_action(self, _("Python documentation"), @@ -1024,7 +1024,7 @@ def add_ipm_action(text, path): _("About %s...") % "Spyder", icon=ima.icon('MessageBoxInformation'), triggered=self.about) - self.help_menu_actions += [menu_separator(), about_action] + self.help_menu_actions += [MENU_SEPARATOR, about_action] # Status bar widgets from spyder.widgets.status import MemoryStatus, CPUStatus @@ -1055,7 +1055,7 @@ def add_ipm_action(text, path): add_actions(self.view_menu, (self.lock_dockwidgets_action, self.close_dockwidget_action, self.maximize_action, - menu_separator())) + MENU_SEPARATOR)) self.show_toolbars_action = create_action(self, _("Show toolbars"), triggered=self.show_toolbars, @@ -1064,18 +1064,18 @@ def add_ipm_action(text, path): "Show toolbars") self.view_menu.addMenu(self.toolbars_menu) self.view_menu.addAction(self.show_toolbars_action) - add_actions(self.view_menu, (menu_separator(), + add_actions(self.view_menu, (MENU_SEPARATOR, self.quick_layout_menu, self.toggle_previous_layout_action, self.toggle_next_layout_action, - menu_separator(), + MENU_SEPARATOR, self.fullscreen_action)) if set_attached_console_visible is not None: cmd_act = create_action(self, _("Attached console window (debugging)"), toggled=set_attached_console_visible) cmd_act.setChecked(is_attached_console_visible()) - add_actions(self.view_menu, (menu_separator(), cmd_act)) + add_actions(self.view_menu, (MENU_SEPARATOR, cmd_act)) # Adding external tools action to "Tools" menu if self.external_tools_menu_actions: diff --git a/spyder/plugins/editor.py b/spyder/plugins/editor.py index 1164d430c66..dbf693121f9 100644 --- a/spyder/plugins/editor.py +++ b/spyder/plugins/editor.py @@ -38,7 +38,7 @@ from spyder.utils import codeanalysis, encoding, programs, sourcecode from spyder.utils import icon_manager as ima from spyder.utils.introspection.manager import IntrospectionManager -from spyder.utils.qthelpers import create_action, add_actions, menu_separator +from spyder.utils.qthelpers import create_action, add_actions, MENU_SEPARATOR from spyder.widgets.findreplace import FindReplace from spyder.widgets.editor import (EditorMainWindow, EditorSplitter, EditorStack, Printer) @@ -985,24 +985,24 @@ def get_plugin_actions(self): self.recent_file_menu.aboutToShow.connect(self.update_recent_file_menu) file_menu_actions = [self.new_action, - menu_separator(), + MENU_SEPARATOR, self.open_action, self.open_last_closed_action, self.recent_file_menu, - menu_separator(), - menu_separator(), + MENU_SEPARATOR, + MENU_SEPARATOR, self.save_action, self.save_all_action, save_as_action, self.file_switcher_action, self.revert_action, - menu_separator(), + MENU_SEPARATOR, print_preview_action, self.print_action, - menu_separator(), + MENU_SEPARATOR, self.close_action, self.close_all_action, - menu_separator()] + MENU_SEPARATOR] self.main.file_menu_actions += file_menu_actions file_toolbar_actions = [self.new_action, self.open_action, @@ -1025,7 +1025,7 @@ def get_plugin_actions(self): self.indent_action, self.unindent_action, self.text_uppercase_action, self.text_lowercase_action] - self.main.edit_menu_actions += [menu_separator()] + self.edit_menu_actions + self.main.edit_menu_actions += [MENU_SEPARATOR] + self.edit_menu_actions edit_toolbar_actions = [self.toggle_comment_action, self.unindent_action, self.indent_action] self.main.edit_toolbar_actions += edit_toolbar_actions @@ -1037,9 +1037,9 @@ def get_plugin_actions(self): # ---- Run menu/toolbar construction ---- run_menu_actions = [run_action, run_cell_action, - run_cell_advance_action, menu_separator(), + run_cell_advance_action, MENU_SEPARATOR, run_selected_action, re_run_action, - configure_action, menu_separator()] + configure_action, MENU_SEPARATOR] self.main.run_menu_actions += run_menu_actions run_toolbar_actions = [run_action, run_cell_action, run_cell_advance_action, re_run_action, @@ -1056,12 +1056,12 @@ def get_plugin_actions(self): debug_return_action, debug_continue_action, debug_exit_action, - menu_separator(), + MENU_SEPARATOR, set_clear_breakpoint_action, set_cond_breakpoint_action, clear_all_breakpoints_action, 'list_breakpoints', - menu_separator(), + MENU_SEPARATOR, self.winpdb_action] self.main.debug_menu_actions += debug_menu_actions debug_toolbar_actions = [debug_action, debug_next_action, @@ -1074,12 +1074,12 @@ def get_plugin_actions(self): self.showblanks_action, trailingspaces_action, fixindentation_action, - menu_separator(), + MENU_SEPARATOR, self.todo_list_action, self.warning_list_action, self.previous_warning_action, self.next_warning_action, - menu_separator(), + MENU_SEPARATOR, self.previous_edit_cursor_action, self.previous_cursor_action, self.next_cursor_action] @@ -1089,7 +1089,7 @@ def get_plugin_actions(self): self.warning_list_action, self.previous_warning_action, self.next_warning_action, - menu_separator(), + MENU_SEPARATOR, self.previous_edit_cursor_action, self.previous_cursor_action, self.next_cursor_action] @@ -1097,13 +1097,13 @@ def get_plugin_actions(self): # ---- Dock widget and file dependent actions ---- self.dock_toolbar_actions = (file_toolbar_actions + - [menu_separator()] + + [MENU_SEPARATOR] + source_toolbar_actions + - [menu_separator()] + + [MENU_SEPARATOR] + run_toolbar_actions + - [menu_separator()] + + [MENU_SEPARATOR] + debug_toolbar_actions + - [menu_separator()] + + [MENU_SEPARATOR] + edit_toolbar_actions) self.pythonfile_dependent_actions = [run_action, configure_action, set_clear_breakpoint_action, diff --git a/spyder/plugins/findinfiles.py b/spyder/plugins/findinfiles.py index df822ac7975..1d5dcb7ebb3 100644 --- a/spyder/plugins/findinfiles.py +++ b/spyder/plugins/findinfiles.py @@ -23,7 +23,7 @@ from spyder.config.utils import get_edit_extensions from spyder.py3compat import getcwd from spyder.utils import icon_manager as ima -from spyder.utils.qthelpers import create_action, menu_separator +from spyder.utils.qthelpers import create_action, MENU_SEPARATOR from spyder.widgets.findinfiles import FindInFilesWidget from spyder.plugins import SpyderPluginMixin @@ -150,8 +150,8 @@ def register_plugin(self): triggered=self.findinfiles_callback, tip=_("Search text in multiple files")) - self.main.search_menu_actions += [menu_separator(), findinfiles_action] - self.main.search_toolbar_actions += [menu_separator(), + self.main.search_menu_actions += [MENU_SEPARATOR, findinfiles_action] + self.main.search_toolbar_actions += [MENU_SEPARATOR, findinfiles_action] def refresh_plugin(self): diff --git a/spyder/plugins/ipythonconsole.py b/spyder/plugins/ipythonconsole.py index 2a5c33db5fd..ac41defa1c5 100644 --- a/spyder/plugins/ipythonconsole.py +++ b/spyder/plugins/ipythonconsole.py @@ -50,7 +50,7 @@ from spyder.plugins.configdialog import PluginConfigPage from spyder.py3compat import (iteritems, PY2, to_binary_string, to_text_string) -from spyder.utils.qthelpers import create_action, menu_separator +from spyder.utils.qthelpers import create_action, MENU_SEPARATOR from spyder.utils import icon_manager as ima from spyder.utils import encoding, programs from spyder.utils.misc import (add_pathlist_to_PYTHONPATH, get_error_match, @@ -751,7 +751,7 @@ def get_plugin_actions(self): # Add the action to the 'Consoles' menu on the main window main_consoles_menu = self.main.consoles_menu_actions main_consoles_menu.insert(0, main_create_client_action) - main_consoles_menu += [menu_separator(), connect_to_kernel_action] + main_consoles_menu += [MENU_SEPARATOR, connect_to_kernel_action] # Plugin actions self.menu_actions = [create_client_action, connect_to_kernel_action] diff --git a/spyder/plugins/projects.py b/spyder/plugins/projects.py index 958c9316ef8..b4139c69349 100644 --- a/spyder/plugins/projects.py +++ b/spyder/plugins/projects.py @@ -24,7 +24,7 @@ from spyder.plugins import SpyderPluginMixin from spyder.py3compat import is_text_string, getcwd from spyder.utils import icon_manager as ima -from spyder.utils.qthelpers import add_actions, create_action, menu_separator +from spyder.utils.qthelpers import add_actions, create_action, MENU_SEPARATOR from spyder.widgets.projects.explorer import ProjectExplorerWidget from spyder.widgets.projects.projectdialog import ProjectDialog from spyder.widgets.projects import EmptyProject @@ -106,11 +106,11 @@ def get_plugin_actions(self): explorer_action = self.toggle_view_action self.main.projects_menu_actions += [self.new_project_action, - menu_separator(), + MENU_SEPARATOR, self.open_project_action, self.close_project_action, self.delete_project_action, - menu_separator(), + MENU_SEPARATOR, self.recent_project_menu, explorer_action] diff --git a/spyder/utils/qthelpers.py b/spyder/utils/qthelpers.py index f7704aded1f..89ce61fec5d 100644 --- a/spyder/utils/qthelpers.py +++ b/spyder/utils/qthelpers.py @@ -500,8 +500,7 @@ def show_std_icons(): sys.exit(app.exec_()) -def menu_separator(): - return None +MENU_SEPARATOR = None if __name__ == "__main__": diff --git a/spyder_pylint/pylint.py b/spyder_pylint/pylint.py index 1f9c73ec79f..798f831bde2 100644 --- a/spyder_pylint/pylint.py +++ b/spyder_pylint/pylint.py @@ -23,7 +23,7 @@ from spyder.plugins import SpyderPluginMixin from spyder.plugins.configdialog import PluginConfigPage from spyder.utils import icon_manager as ima -from spyder.utils.qthelpers import create_action, menu_separator +from spyder.utils.qthelpers import create_action, MENU_SEPARATOR from .widgets.pylintgui import (PYLINT_PATH, PylintWidget) @@ -136,7 +136,7 @@ def register_plugin(self): self.register_shortcut(pylint_act, context="Pylint", name="Run analysis") - self.main.source_menu_actions += [menu_separator(), pylint_act] + self.main.source_menu_actions += [MENU_SEPARATOR, pylint_act] self.main.editor.pythonfile_dependent_actions += [pylint_act] def refresh_plugin(self):