Skip to content

Commit

Permalink
Remove more unused imports
Browse files Browse the repository at this point in the history
  • Loading branch information
ccordoba12 committed Dec 11, 2021
1 parent b8cba76 commit f47190a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 10 deletions.
9 changes: 2 additions & 7 deletions spyder/plugins/maininterpreter/tests/test_confpage.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
# Local imports
from spyder.api.plugins import Plugins
from spyder.api.plugin_registration.registry import PLUGIN_REGISTRY
from spyder.config.manager import CONF
from spyder.plugins.preferences.api import PreferencePages
from spyder.plugins.maininterpreter.plugin import MainInterpreter
from spyder.plugins.preferences.tests.conftest import MainWindowMock
from spyder.utils.conda import get_list_conda_envs
Expand All @@ -22,7 +20,7 @@

# Get envs to show them in the Main interpreter page. This is actually
# done in a thread in the InterpreterStatus widget.
# We also recording the time needed to get them to compare it with the
# We're also recording the time needed to get them to compare it with the
# loading time of that config page.
t0 = time.time()
get_list_conda_envs()
Expand All @@ -31,14 +29,11 @@


def test_load_time(qtbot):
from spyder.plugins.maininterpreter.confpage import (
MainInterpreterConfigPage)

# Create Preferences dialog
main = MainWindowMock()
preferences = main.get_plugin(Plugins.Preferences)

main_interpreter = PLUGIN_REGISTRY.register_plugin(main, MainInterpreter)
PLUGIN_REGISTRY.register_plugin(main, MainInterpreter)

# Create page and measure time to do it
t0 = time.time()
Expand Down
2 changes: 0 additions & 2 deletions spyder/plugins/preferences/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,6 @@ def on_application_available(self):

@on_plugin_teardown(plugin=Plugins.MainMenu)
def on_main_menu_teardown(self):
container = self.get_container()
main_menu = self.get_plugin(Plugins.MainMenu)

main_menu.remove_item_from_application_menu(
Expand All @@ -325,7 +324,6 @@ def on_main_menu_teardown(self):

@on_plugin_teardown(plugin=Plugins.Toolbar)
def on_toolbar_teardown(self):
container = self.get_container()
toolbar = self.get_plugin(Plugins.Toolbar)
toolbar.remove_item_from_application_toolbar(
PreferencesActions.Show,
Expand Down
1 change: 0 additions & 1 deletion spyder/plugins/preferences/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"""

import types

from unittest.mock import Mock, MagicMock

# Third party imports
Expand Down

0 comments on commit f47190a

Please sign in to comment.