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

Backport PR #23217 on branch 6.x (PR: A couple of fixes for the Internal console) #23218

Merged
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
1 change: 1 addition & 0 deletions spyder/plugins/console/widgets/main_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ def __init__(self, name, plugin, parent=None):
self.dialog_manager = DialogManager()
self.error_dlg = None
self.shell = InternalShell( # TODO: Move to use SpyderWidgetMixin?
parent=parent,
commands=[],
message=message,
max_line_count=self.get_conf('max_line_count'),
Expand Down
14 changes: 8 additions & 6 deletions spyder/plugins/console/widgets/shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,12 @@
MAX_LINES = 1000


class ShellBaseWidget(ConsoleBaseWidget, SaveHistoryMixin,
BrowseHistoryMixin):
class ShellBaseWidget(
ConsoleBaseWidget,
SpyderShortcutsMixin,
SaveHistoryMixin,
BrowseHistoryMixin
):
"""
Shell base widget
"""
Expand All @@ -65,6 +69,7 @@ def __init__(self, parent, history_filename, profile=False,
parent : specifies the parent widget
"""
ConsoleBaseWidget.__init__(self, parent)
SpyderShortcutsMixin.__init__(self)
SaveHistoryMixin.__init__(self, history_filename)
BrowseHistoryMixin.__init__(self)

Expand Down Expand Up @@ -642,9 +647,7 @@ def drop_pathlist(self, pathlist):
# from spyder.utils.debug import log_methods_calls
# log_methods_calls('log.log', ShellBaseWidget)

class PythonShellWidget(
TracebackLinksMixin, ShellBaseWidget, GetHelpMixin, SpyderShortcutsMixin
):
class PythonShellWidget(ShellBaseWidget, TracebackLinksMixin, GetHelpMixin):
"""Python shell widget"""
QT_CLASS = ShellBaseWidget
INITHISTORY = ['# -*- coding: utf-8 -*-',
Expand Down Expand Up @@ -679,7 +682,6 @@ def __init__(
)
TracebackLinksMixin.__init__(self)
GetHelpMixin.__init__(self)
SpyderShortcutsMixin.__init__(self)

# Local shortcuts
self.register_shortcuts()
Expand Down
Loading