Skip to content

Commit

Permalink
Merge pull request #23217 from ccordoba12/issue-23196
Browse files Browse the repository at this point in the history
PR: A couple of fixes for the Internal console
  • Loading branch information
ccordoba12 authored Dec 8, 2024
2 parents b3606e2 + 049774b commit a0e3261
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
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

0 comments on commit a0e3261

Please sign in to comment.