|
18 | 18 | # pylint: disable=R0911
|
19 | 19 | # pylint: disable=R0201
|
20 | 20 |
|
| 21 | +# Qt imports |
| 22 | +from spyderlib.qt import PYQT5 |
21 | 23 | from spyderlib.qt.QtGui import (QDockWidget, QWidget, QShortcut, QCursor,
|
22 | 24 | QKeySequence, QMainWindow, QApplication)
|
23 | 25 | from spyderlib.qt.QtCore import Qt, Signal
|
24 | 26 |
|
| 27 | +# Stdlib imports |
| 28 | +import sys |
| 29 | + |
25 | 30 | # Local imports
|
26 | 31 | from spyderlib.utils.qthelpers import toggle_actions, get_icon, create_action
|
27 | 32 | from spyderlib.baseconfig import _
|
|
30 | 35 | from spyderlib.guiconfig import get_font, set_font
|
31 | 36 | from spyderlib.plugins.configdialog import SpyderConfigPage
|
32 | 37 | from spyderlib.py3compat import configparser, is_text_string
|
33 |
| -import sys |
34 |
| -from spyderlib.qt import PYQT5 |
35 | 38 |
|
36 | 39 |
|
37 | 40 | class PluginConfigPage(SpyderConfigPage):
|
@@ -182,8 +185,7 @@ def __init__(self, main = None, **kwds):
|
182 | 185 | # We decided to create our own toggle action instead of using
|
183 | 186 | # the one that comes with dockwidget because it's not possible
|
184 | 187 | # to raise and focus the plugin with it.
|
185 |
| - self.toggle_view_action = None |
186 |
| - |
| 188 | + self.toggle_view_action = None |
187 | 189 |
|
188 | 190 | def initialize_plugin(self):
|
189 | 191 | """Initialize plugin: connect signals, setup actions, ..."""
|
@@ -354,7 +356,6 @@ def set_plugin_font(self, font, option=None):
|
354 | 356 | """Set plugin font option"""
|
355 | 357 | set_font(font, self.CONF_SECTION, option)
|
356 | 358 |
|
357 |
| - |
358 | 359 | def __show_message(self, message, timeout=0):
|
359 | 360 | """Show message in main window's status bar"""
|
360 | 361 | self.main.statusBar().showMessage(message, timeout)
|
@@ -418,14 +419,14 @@ class SpyderPluginWidget(QWidget, SpyderPluginMixin):
|
418 | 419 | sig_option_changed = Signal(str, object)
|
419 | 420 | show_message = Signal(str, int)
|
420 | 421 | update_plugin_title = Signal()
|
| 422 | + |
421 | 423 | if PYQT5:
|
422 | 424 | def __init__(self, parent, **kwds):
|
423 | 425 | super().__init__(**kwds)
|
424 | 426 | else:
|
425 | 427 | def __init__(self, parent):
|
426 | 428 | QWidget.__init__(self, parent)
|
427 | 429 | SpyderPluginMixin.__init__(self, parent)
|
428 |
| - |
429 | 430 |
|
430 | 431 | def get_plugin_title(self):
|
431 | 432 | """
|
|
0 commit comments