repo
stringclasses
85 values
path
stringlengths
8
121
func_name
stringlengths
1
82
original_string
stringlengths
112
65.5k
language
stringclasses
1 value
code
stringlengths
112
65.5k
code_tokens
listlengths
20
4.09k
docstring
stringlengths
3
46.3k
docstring_tokens
listlengths
1
564
sha
stringclasses
85 values
url
stringlengths
93
218
partition
stringclasses
1 value
spyder-ide/spyder
spyder/plugins/editor/plugin.py
Editor.lsp_server_ready
def lsp_server_ready(self, language, configuration): """Notify all stackeditors about LSP server availability.""" for editorstack in self.editorstacks: editorstack.notify_server_ready(language, configuration)
python
def lsp_server_ready(self, language, configuration): """Notify all stackeditors about LSP server availability.""" for editorstack in self.editorstacks: editorstack.notify_server_ready(language, configuration)
[ "def", "lsp_server_ready", "(", "self", ",", "language", ",", "configuration", ")", ":", "for", "editorstack", "in", "self", ".", "editorstacks", ":", "editorstack", ".", "notify_server_ready", "(", "language", ",", "configuration", ")" ]
Notify all stackeditors about LSP server availability.
[ "Notify", "all", "stackeditors", "about", "LSP", "server", "availability", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L301-L304
train
spyder-ide/spyder
spyder/plugins/editor/plugin.py
Editor.visibility_changed
def visibility_changed(self, enable): """DockWidget visibility has changed""" SpyderPluginWidget.visibility_changed(self, enable) if self.dockwidget is None: return if self.dockwidget.isWindow(): self.dock_toolbar.show() else: self.dock...
python
def visibility_changed(self, enable): """DockWidget visibility has changed""" SpyderPluginWidget.visibility_changed(self, enable) if self.dockwidget is None: return if self.dockwidget.isWindow(): self.dock_toolbar.show() else: self.dock...
[ "def", "visibility_changed", "(", "self", ",", "enable", ")", ":", "SpyderPluginWidget", ".", "visibility_changed", "(", "self", ",", "enable", ")", "if", "self", ".", "dockwidget", "is", "None", ":", "return", "if", "self", ".", "dockwidget", ".", "isWindow...
DockWidget visibility has changed
[ "DockWidget", "visibility", "has", "changed" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L329-L340
train
spyder-ide/spyder
spyder/plugins/editor/plugin.py
Editor.closing_plugin
def closing_plugin(self, cancelable=False): """Perform actions before parent main window is closed""" state = self.splitter.saveState() self.set_option('splitter_state', qbytearray_to_str(state)) filenames = [] editorstack = self.editorstacks[0] active_project_pat...
python
def closing_plugin(self, cancelable=False): """Perform actions before parent main window is closed""" state = self.splitter.saveState() self.set_option('splitter_state', qbytearray_to_str(state)) filenames = [] editorstack = self.editorstacks[0] active_project_pat...
[ "def", "closing_plugin", "(", "self", ",", "cancelable", "=", "False", ")", ":", "state", "=", "self", ".", "splitter", ".", "saveState", "(", ")", "self", ".", "set_option", "(", "'splitter_state'", ",", "qbytearray_to_str", "(", "state", ")", ")", "filen...
Perform actions before parent main window is closed
[ "Perform", "actions", "before", "parent", "main", "window", "is", "closed" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L348-L382
train
spyder-ide/spyder
spyder/plugins/editor/plugin.py
Editor.get_plugin_actions
def get_plugin_actions(self): """Return a list of actions related to plugin""" # ---- File menu and toolbar ---- self.new_action = create_action( self, _("&New file..."), icon=ima.icon('filenew'), tip=_("New file"), triggered...
python
def get_plugin_actions(self): """Return a list of actions related to plugin""" # ---- File menu and toolbar ---- self.new_action = create_action( self, _("&New file..."), icon=ima.icon('filenew'), tip=_("New file"), triggered...
[ "def", "get_plugin_actions", "(", "self", ")", ":", "# ---- File menu and toolbar ----\r", "self", ".", "new_action", "=", "create_action", "(", "self", ",", "_", "(", "\"&New file...\"", ")", ",", "icon", "=", "ima", ".", "icon", "(", "'filenew'", ")", ",", ...
Return a list of actions related to plugin
[ "Return", "a", "list", "of", "actions", "related", "to", "plugin" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L384-L944
train
spyder-ide/spyder
spyder/plugins/editor/plugin.py
Editor.register_plugin
def register_plugin(self): """Register plugin in Spyder's main window""" self.main.restore_scrollbar_position.connect( self.restore_scrollbar_position) self.main.console.edit_goto.connect(self.load) self.exec_in_extconsole.connect(self.main.execute_in_external_console) ...
python
def register_plugin(self): """Register plugin in Spyder's main window""" self.main.restore_scrollbar_position.connect( self.restore_scrollbar_position) self.main.console.edit_goto.connect(self.load) self.exec_in_extconsole.connect(self.main.execute_in_external_console) ...
[ "def", "register_plugin", "(", "self", ")", ":", "self", ".", "main", ".", "restore_scrollbar_position", ".", "connect", "(", "self", ".", "restore_scrollbar_position", ")", "self", ".", "main", ".", "console", ".", "edit_goto", ".", "connect", "(", "self", ...
Register plugin in Spyder's main window
[ "Register", "plugin", "in", "Spyder", "s", "main", "window" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L946-L962
train
spyder-ide/spyder
spyder/plugins/editor/plugin.py
Editor.update_font
def update_font(self): """Update font from Preferences""" font = self.get_plugin_font() color_scheme = self.get_color_scheme() for editorstack in self.editorstacks: editorstack.set_default_font(font, color_scheme) completion_size = CONF.get('main', 'completi...
python
def update_font(self): """Update font from Preferences""" font = self.get_plugin_font() color_scheme = self.get_color_scheme() for editorstack in self.editorstacks: editorstack.set_default_font(font, color_scheme) completion_size = CONF.get('main', 'completi...
[ "def", "update_font", "(", "self", ")", ":", "font", "=", "self", ".", "get_plugin_font", "(", ")", "color_scheme", "=", "self", ".", "get_color_scheme", "(", ")", "for", "editorstack", "in", "self", ".", "editorstacks", ":", "editorstack", ".", "set_default...
Update font from Preferences
[ "Update", "font", "from", "Preferences" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L964-L973
train
spyder-ide/spyder
spyder/plugins/editor/plugin.py
Editor._create_checkable_action
def _create_checkable_action(self, text, conf_name, editorstack_method): """Helper function to create a checkable action. Args: text (str): Text to be displayed in the action. conf_name (str): configuration setting associated with the action editorstack_method ...
python
def _create_checkable_action(self, text, conf_name, editorstack_method): """Helper function to create a checkable action. Args: text (str): Text to be displayed in the action. conf_name (str): configuration setting associated with the action editorstack_method ...
[ "def", "_create_checkable_action", "(", "self", ",", "text", ",", "conf_name", ",", "editorstack_method", ")", ":", "def", "toogle", "(", "checked", ")", ":", "self", ".", "switch_to_plugin", "(", ")", "self", ".", "_toggle_checkable_action", "(", "checked", "...
Helper function to create a checkable action. Args: text (str): Text to be displayed in the action. conf_name (str): configuration setting associated with the action editorstack_method (str): name of EditorStack class that will be used to update the cha...
[ "Helper", "function", "to", "create", "a", "checkable", "action", ".", "Args", ":", "text", "(", "str", ")", ":", "Text", "to", "be", "displayed", "in", "the", "action", ".", "conf_name", "(", "str", ")", ":", "configuration", "setting", "associated", "w...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L975-L990
train
spyder-ide/spyder
spyder/plugins/editor/plugin.py
Editor._toggle_checkable_action
def _toggle_checkable_action(self, checked, editorstack_method, conf_name): """Handle the toogle of a checkable action. Update editorstacks and the configuration. Args: checked (bool): State of the action. editorstack_method (str): name of EditorStack class that ...
python
def _toggle_checkable_action(self, checked, editorstack_method, conf_name): """Handle the toogle of a checkable action. Update editorstacks and the configuration. Args: checked (bool): State of the action. editorstack_method (str): name of EditorStack class that ...
[ "def", "_toggle_checkable_action", "(", "self", ",", "checked", ",", "editorstack_method", ",", "conf_name", ")", ":", "if", "self", ".", "editorstacks", ":", "for", "editorstack", "in", "self", ".", "editorstacks", ":", "try", ":", "editorstack", ".", "__geta...
Handle the toogle of a checkable action. Update editorstacks and the configuration. Args: checked (bool): State of the action. editorstack_method (str): name of EditorStack class that will be used to update the changes in each editorstack. co...
[ "Handle", "the", "toogle", "of", "a", "checkable", "action", ".", "Update", "editorstacks", "and", "the", "configuration", ".", "Args", ":", "checked", "(", "bool", ")", ":", "State", "of", "the", "action", ".", "editorstack_method", "(", "str", ")", ":", ...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L993-L1018
train
spyder-ide/spyder
spyder/plugins/editor/plugin.py
Editor.received_sig_option_changed
def received_sig_option_changed(self, option, value): """ Called when sig_option_changed is received. If option being changed is autosave_mapping, then synchronize new mapping with all editor stacks except the sender. """ if option == 'autosave_mapping': ...
python
def received_sig_option_changed(self, option, value): """ Called when sig_option_changed is received. If option being changed is autosave_mapping, then synchronize new mapping with all editor stacks except the sender. """ if option == 'autosave_mapping': ...
[ "def", "received_sig_option_changed", "(", "self", ",", "option", ",", "value", ")", ":", "if", "option", "==", "'autosave_mapping'", ":", "for", "editorstack", "in", "self", ".", "editorstacks", ":", "if", "editorstack", "!=", "self", ".", "sender", "(", ")...
Called when sig_option_changed is received. If option being changed is autosave_mapping, then synchronize new mapping with all editor stacks except the sender.
[ "Called", "when", "sig_option_changed", "is", "received", ".", "If", "option", "being", "changed", "is", "autosave_mapping", "then", "synchronize", "new", "mapping", "with", "all", "editor", "stacks", "except", "the", "sender", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L1020-L1031
train
spyder-ide/spyder
spyder/plugins/editor/plugin.py
Editor.unregister_editorstack
def unregister_editorstack(self, editorstack): """Removing editorstack only if it's not the last remaining""" self.remove_last_focus_editorstack(editorstack) if len(self.editorstacks) > 1: index = self.editorstacks.index(editorstack) self.editorstacks.pop(index) ...
python
def unregister_editorstack(self, editorstack): """Removing editorstack only if it's not the last remaining""" self.remove_last_focus_editorstack(editorstack) if len(self.editorstacks) > 1: index = self.editorstacks.index(editorstack) self.editorstacks.pop(index) ...
[ "def", "unregister_editorstack", "(", "self", ",", "editorstack", ")", ":", "self", ".", "remove_last_focus_editorstack", "(", "editorstack", ")", "if", "len", "(", "self", ".", "editorstacks", ")", ">", "1", ":", "index", "=", "self", ".", "editorstacks", "...
Removing editorstack only if it's not the last remaining
[ "Removing", "editorstack", "only", "if", "it", "s", "not", "the", "last", "remaining" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L1202-L1211
train
spyder-ide/spyder
spyder/plugins/editor/plugin.py
Editor.setup_other_windows
def setup_other_windows(self): """Setup toolbars and menus for 'New window' instances""" self.toolbar_list = ((_("File toolbar"), "file_toolbar", self.main.file_toolbar_actions), (_("Search toolbar"), "search_toolbar", ...
python
def setup_other_windows(self): """Setup toolbars and menus for 'New window' instances""" self.toolbar_list = ((_("File toolbar"), "file_toolbar", self.main.file_toolbar_actions), (_("Search toolbar"), "search_toolbar", ...
[ "def", "setup_other_windows", "(", "self", ")", ":", "self", ".", "toolbar_list", "=", "(", "(", "_", "(", "\"File toolbar\"", ")", ",", "\"file_toolbar\"", ",", "self", ".", "main", ".", "file_toolbar_actions", ")", ",", "(", "_", "(", "\"Search toolbar\"",...
Setup toolbars and menus for 'New window' instances
[ "Setup", "toolbars", "and", "menus", "for", "New", "window", "instances" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L1245-L1271
train
spyder-ide/spyder
spyder/plugins/editor/plugin.py
Editor.set_current_filename
def set_current_filename(self, filename, editorwindow=None, focus=True): """Set focus to *filename* if this file has been opened. Return the editor instance associated to *filename*. """ editorstack = self.get_current_editorstack(editorwindow) return editorstack.set_curren...
python
def set_current_filename(self, filename, editorwindow=None, focus=True): """Set focus to *filename* if this file has been opened. Return the editor instance associated to *filename*. """ editorstack = self.get_current_editorstack(editorwindow) return editorstack.set_curren...
[ "def", "set_current_filename", "(", "self", ",", "filename", ",", "editorwindow", "=", "None", ",", "focus", "=", "True", ")", ":", "editorstack", "=", "self", ".", "get_current_editorstack", "(", "editorwindow", ")", "return", "editorstack", ".", "set_current_f...
Set focus to *filename* if this file has been opened. Return the editor instance associated to *filename*.
[ "Set", "focus", "to", "*", "filename", "*", "if", "this", "file", "has", "been", "opened", ".", "Return", "the", "editor", "instance", "associated", "to", "*", "filename", "*", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L1343-L1349
train
spyder-ide/spyder
spyder/plugins/editor/plugin.py
Editor.refresh_file_dependent_actions
def refresh_file_dependent_actions(self): """Enable/disable file dependent actions (only if dockwidget is visible)""" if self.dockwidget and self.dockwidget.isVisible(): enable = self.get_current_editor() is not None for action in self.file_dependent_actions: ...
python
def refresh_file_dependent_actions(self): """Enable/disable file dependent actions (only if dockwidget is visible)""" if self.dockwidget and self.dockwidget.isVisible(): enable = self.get_current_editor() is not None for action in self.file_dependent_actions: ...
[ "def", "refresh_file_dependent_actions", "(", "self", ")", ":", "if", "self", ".", "dockwidget", "and", "self", ".", "dockwidget", ".", "isVisible", "(", ")", ":", "enable", "=", "self", ".", "get_current_editor", "(", ")", "is", "not", "None", "for", "act...
Enable/disable file dependent actions (only if dockwidget is visible)
[ "Enable", "/", "disable", "file", "dependent", "actions", "(", "only", "if", "dockwidget", "is", "visible", ")" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L1365-L1371
train
spyder-ide/spyder
spyder/plugins/editor/plugin.py
Editor.refresh_save_all_action
def refresh_save_all_action(self): """Enable 'Save All' if there are files to be saved""" editorstack = self.get_current_editorstack() if editorstack: state = any(finfo.editor.document().isModified() or finfo.newly_created for finfo in editorstack.data) ...
python
def refresh_save_all_action(self): """Enable 'Save All' if there are files to be saved""" editorstack = self.get_current_editorstack() if editorstack: state = any(finfo.editor.document().isModified() or finfo.newly_created for finfo in editorstack.data) ...
[ "def", "refresh_save_all_action", "(", "self", ")", ":", "editorstack", "=", "self", ".", "get_current_editorstack", "(", ")", "if", "editorstack", ":", "state", "=", "any", "(", "finfo", ".", "editor", ".", "document", "(", ")", ".", "isModified", "(", ")...
Enable 'Save All' if there are files to be saved
[ "Enable", "Save", "All", "if", "there", "are", "files", "to", "be", "saved" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L1373-L1379
train
spyder-ide/spyder
spyder/plugins/editor/plugin.py
Editor.update_warning_menu
def update_warning_menu(self): """Update warning list menu""" editor = self.get_current_editor() check_results = editor.get_current_warnings() self.warning_menu.clear() filename = self.get_current_filename() for message, line_number in check_results: er...
python
def update_warning_menu(self): """Update warning list menu""" editor = self.get_current_editor() check_results = editor.get_current_warnings() self.warning_menu.clear() filename = self.get_current_filename() for message, line_number in check_results: er...
[ "def", "update_warning_menu", "(", "self", ")", ":", "editor", "=", "self", ".", "get_current_editor", "(", ")", "check_results", "=", "editor", ".", "get_current_warnings", "(", ")", "self", ".", "warning_menu", ".", "clear", "(", ")", "filename", "=", "sel...
Update warning list menu
[ "Update", "warning", "list", "menu" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L1381-L1393
train
spyder-ide/spyder
spyder/plugins/editor/plugin.py
Editor.update_todo_menu
def update_todo_menu(self): """Update todo list menu""" editorstack = self.get_current_editorstack() results = editorstack.get_todo_results() self.todo_menu.clear() filename = self.get_current_filename() for text, line0 in results: icon = ima.icon('todo...
python
def update_todo_menu(self): """Update todo list menu""" editorstack = self.get_current_editorstack() results = editorstack.get_todo_results() self.todo_menu.clear() filename = self.get_current_filename() for text, line0 in results: icon = ima.icon('todo...
[ "def", "update_todo_menu", "(", "self", ")", ":", "editorstack", "=", "self", ".", "get_current_editorstack", "(", ")", "results", "=", "editorstack", ".", "get_todo_results", "(", ")", "self", ".", "todo_menu", ".", "clear", "(", ")", "filename", "=", "self...
Update todo list menu
[ "Update", "todo", "list", "menu" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L1395-L1406
train
spyder-ide/spyder
spyder/plugins/editor/plugin.py
Editor.todo_results_changed
def todo_results_changed(self): """ Synchronize todo results between editorstacks Refresh todo list navigation buttons """ editorstack = self.get_current_editorstack() results = editorstack.get_todo_results() index = editorstack.get_stack_index() i...
python
def todo_results_changed(self): """ Synchronize todo results between editorstacks Refresh todo list navigation buttons """ editorstack = self.get_current_editorstack() results = editorstack.get_todo_results() index = editorstack.get_stack_index() i...
[ "def", "todo_results_changed", "(", "self", ")", ":", "editorstack", "=", "self", ".", "get_current_editorstack", "(", ")", "results", "=", "editorstack", ".", "get_todo_results", "(", ")", "index", "=", "editorstack", ".", "get_stack_index", "(", ")", "if", "...
Synchronize todo results between editorstacks Refresh todo list navigation buttons
[ "Synchronize", "todo", "results", "between", "editorstacks", "Refresh", "todo", "list", "navigation", "buttons" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L1408-L1421
train
spyder-ide/spyder
spyder/plugins/editor/plugin.py
Editor.opened_files_list_changed
def opened_files_list_changed(self): """ Opened files list has changed: --> open/close file action --> modification ('*' added to title) --> current edited file has changed """ # Refresh Python file dependent actions: editor = self.get_current_edit...
python
def opened_files_list_changed(self): """ Opened files list has changed: --> open/close file action --> modification ('*' added to title) --> current edited file has changed """ # Refresh Python file dependent actions: editor = self.get_current_edit...
[ "def", "opened_files_list_changed", "(", "self", ")", ":", "# Refresh Python file dependent actions:\r", "editor", "=", "self", ".", "get_current_editor", "(", ")", "if", "editor", ":", "python_enable", "=", "editor", ".", "is_python", "(", ")", "cython_enable", "="...
Opened files list has changed: --> open/close file action --> modification ('*' added to title) --> current edited file has changed
[ "Opened", "files", "list", "has", "changed", ":", "--", ">", "open", "/", "close", "file", "action", "--", ">", "modification", "(", "*", "added", "to", "title", ")", "--", ">", "current", "edited", "file", "has", "changed" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L1436-L1458
train
spyder-ide/spyder
spyder/plugins/editor/plugin.py
Editor.update_code_analysis_actions
def update_code_analysis_actions(self): """Update actions in the warnings menu.""" editor = self.get_current_editor() # To fix an error at startup if editor is None: return results = editor.get_current_warnings() # Update code analysis buttons ...
python
def update_code_analysis_actions(self): """Update actions in the warnings menu.""" editor = self.get_current_editor() # To fix an error at startup if editor is None: return results = editor.get_current_warnings() # Update code analysis buttons ...
[ "def", "update_code_analysis_actions", "(", "self", ")", ":", "editor", "=", "self", ".", "get_current_editor", "(", ")", "# To fix an error at startup\r", "if", "editor", "is", "None", ":", "return", "results", "=", "editor", ".", "get_current_warnings", "(", ")"...
Update actions in the warnings menu.
[ "Update", "actions", "in", "the", "warnings", "menu", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L1460-L1474
train
spyder-ide/spyder
spyder/plugins/editor/plugin.py
Editor.save_bookmarks
def save_bookmarks(self, filename, bookmarks): """Receive bookmark changes and save them.""" filename = to_text_string(filename) bookmarks = to_text_string(bookmarks) filename = osp.normpath(osp.abspath(filename)) bookmarks = eval(bookmarks) save_bookmarks(filename,...
python
def save_bookmarks(self, filename, bookmarks): """Receive bookmark changes and save them.""" filename = to_text_string(filename) bookmarks = to_text_string(bookmarks) filename = osp.normpath(osp.abspath(filename)) bookmarks = eval(bookmarks) save_bookmarks(filename,...
[ "def", "save_bookmarks", "(", "self", ",", "filename", ",", "bookmarks", ")", ":", "filename", "=", "to_text_string", "(", "filename", ")", "bookmarks", "=", "to_text_string", "(", "bookmarks", ")", "filename", "=", "osp", ".", "normpath", "(", "osp", ".", ...
Receive bookmark changes and save them.
[ "Receive", "bookmark", "changes", "and", "save", "them", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L1508-L1514
train
spyder-ide/spyder
spyder/plugins/editor/plugin.py
Editor.__load_temp_file
def __load_temp_file(self): """Load temporary file from a text file in user home directory""" if not osp.isfile(self.TEMPFILE_PATH): # Creating temporary file default = ['# -*- coding: utf-8 -*-', '"""', _("Spyder Editor"), '', ...
python
def __load_temp_file(self): """Load temporary file from a text file in user home directory""" if not osp.isfile(self.TEMPFILE_PATH): # Creating temporary file default = ['# -*- coding: utf-8 -*-', '"""', _("Spyder Editor"), '', ...
[ "def", "__load_temp_file", "(", "self", ")", ":", "if", "not", "osp", ".", "isfile", "(", "self", ".", "TEMPFILE_PATH", ")", ":", "# Creating temporary file\r", "default", "=", "[", "'# -*- coding: utf-8 -*-'", ",", "'\"\"\"'", ",", "_", "(", "\"Spyder Editor\""...
Load temporary file from a text file in user home directory
[ "Load", "temporary", "file", "from", "a", "text", "file", "in", "user", "home", "directory" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L1517-L1534
train
spyder-ide/spyder
spyder/plugins/editor/plugin.py
Editor.__set_workdir
def __set_workdir(self): """Set current script directory as working directory""" fname = self.get_current_filename() if fname is not None: directory = osp.dirname(osp.abspath(fname)) self.open_dir.emit(directory)
python
def __set_workdir(self): """Set current script directory as working directory""" fname = self.get_current_filename() if fname is not None: directory = osp.dirname(osp.abspath(fname)) self.open_dir.emit(directory)
[ "def", "__set_workdir", "(", "self", ")", ":", "fname", "=", "self", ".", "get_current_filename", "(", ")", "if", "fname", "is", "not", "None", ":", "directory", "=", "osp", ".", "dirname", "(", "osp", ".", "abspath", "(", "fname", ")", ")", "self", ...
Set current script directory as working directory
[ "Set", "current", "script", "directory", "as", "working", "directory" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L1537-L1542
train
spyder-ide/spyder
spyder/plugins/editor/plugin.py
Editor.__add_recent_file
def __add_recent_file(self, fname): """Add to recent file list""" if fname is None: return if fname in self.recent_files: self.recent_files.remove(fname) self.recent_files.insert(0, fname) if len(self.recent_files) > self.get_option('max_recent_file...
python
def __add_recent_file(self, fname): """Add to recent file list""" if fname is None: return if fname in self.recent_files: self.recent_files.remove(fname) self.recent_files.insert(0, fname) if len(self.recent_files) > self.get_option('max_recent_file...
[ "def", "__add_recent_file", "(", "self", ",", "fname", ")", ":", "if", "fname", "is", "None", ":", "return", "if", "fname", "in", "self", ".", "recent_files", ":", "self", ".", "recent_files", ".", "remove", "(", "fname", ")", "self", ".", "recent_files"...
Add to recent file list
[ "Add", "to", "recent", "file", "list" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L1544-L1552
train
spyder-ide/spyder
spyder/plugins/editor/plugin.py
Editor._clone_file_everywhere
def _clone_file_everywhere(self, finfo): """Clone file (*src_editor* widget) in all editorstacks Cloning from the first editorstack in which every single new editor is created (when loading or creating a new file)""" for editorstack in self.editorstacks[1:]: editor = edi...
python
def _clone_file_everywhere(self, finfo): """Clone file (*src_editor* widget) in all editorstacks Cloning from the first editorstack in which every single new editor is created (when loading or creating a new file)""" for editorstack in self.editorstacks[1:]: editor = edi...
[ "def", "_clone_file_everywhere", "(", "self", ",", "finfo", ")", ":", "for", "editorstack", "in", "self", ".", "editorstacks", "[", "1", ":", "]", ":", "editor", "=", "editorstack", ".", "clone_editor_from", "(", "finfo", ",", "set_current", "=", "False", ...
Clone file (*src_editor* widget) in all editorstacks Cloning from the first editorstack in which every single new editor is created (when loading or creating a new file)
[ "Clone", "file", "(", "*", "src_editor", "*", "widget", ")", "in", "all", "editorstacks", "Cloning", "from", "the", "first", "editorstack", "in", "which", "every", "single", "new", "editor", "is", "created", "(", "when", "loading", "or", "creating", "a", "...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L1554-L1560
train
spyder-ide/spyder
spyder/plugins/editor/plugin.py
Editor.new
def new(self, fname=None, editorstack=None, text=None): """ Create a new file - Untitled fname=None --> fname will be 'untitledXX.py' but do not create file fname=<basestring> --> create file """ # If no text is provided, create default content empty = Fa...
python
def new(self, fname=None, editorstack=None, text=None): """ Create a new file - Untitled fname=None --> fname will be 'untitledXX.py' but do not create file fname=<basestring> --> create file """ # If no text is provided, create default content empty = Fa...
[ "def", "new", "(", "self", ",", "fname", "=", "None", ",", "editorstack", "=", "None", ",", "text", "=", "None", ")", ":", "# If no text is provided, create default content\r", "empty", "=", "False", "try", ":", "if", "text", "is", "None", ":", "default_cont...
Create a new file - Untitled fname=None --> fname will be 'untitledXX.py' but do not create file fname=<basestring> --> create file
[ "Create", "a", "new", "file", "-", "Untitled", "fname", "=", "None", "--", ">", "fname", "will", "be", "untitledXX", ".", "py", "but", "do", "not", "create", "file", "fname", "=", "<basestring", ">", "--", ">", "create", "file" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L1565-L1646
train
spyder-ide/spyder
spyder/plugins/editor/plugin.py
Editor.update_recent_file_menu
def update_recent_file_menu(self): """Update recent file menu""" recent_files = [] for fname in self.recent_files: if self.is_file_opened(fname) is None and osp.isfile(fname): recent_files.append(fname) self.recent_file_menu.clear() if recent_fi...
python
def update_recent_file_menu(self): """Update recent file menu""" recent_files = [] for fname in self.recent_files: if self.is_file_opened(fname) is None and osp.isfile(fname): recent_files.append(fname) self.recent_file_menu.clear() if recent_fi...
[ "def", "update_recent_file_menu", "(", "self", ")", ":", "recent_files", "=", "[", "]", "for", "fname", "in", "self", ".", "recent_files", ":", "if", "self", ".", "is_file_opened", "(", "fname", ")", "is", "None", "and", "osp", ".", "isfile", "(", "fname...
Update recent file menu
[ "Update", "recent", "file", "menu" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L1652-L1668
train
spyder-ide/spyder
spyder/plugins/editor/plugin.py
Editor.load
def load(self, filenames=None, goto=None, word='', editorwindow=None, processevents=True, start_column=None, set_focus=True, add_where='end'): """ Load a text file editorwindow: load in this editorwindow (useful when clicking on outline explorer with multi...
python
def load(self, filenames=None, goto=None, word='', editorwindow=None, processevents=True, start_column=None, set_focus=True, add_where='end'): """ Load a text file editorwindow: load in this editorwindow (useful when clicking on outline explorer with multi...
[ "def", "load", "(", "self", ",", "filenames", "=", "None", ",", "goto", "=", "None", ",", "word", "=", "''", ",", "editorwindow", "=", "None", ",", "processevents", "=", "True", ",", "start_column", "=", "None", ",", "set_focus", "=", "True", ",", "a...
Load a text file editorwindow: load in this editorwindow (useful when clicking on outline explorer with multiple editor windows) processevents: determines if processEvents() should be called at the end of this method (set to False to prevent keyboard events from creeping thr...
[ "Load", "a", "text", "file", "editorwindow", ":", "load", "in", "this", "editorwindow", "(", "useful", "when", "clicking", "on", "outline", "explorer", "with", "multiple", "editor", "windows", ")", "processevents", ":", "determines", "if", "processEvents", "()",...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L1689-L1828
train
spyder-ide/spyder
spyder/plugins/editor/plugin.py
Editor.print_file
def print_file(self): """Print current file""" editor = self.get_current_editor() filename = self.get_current_filename() printer = Printer(mode=QPrinter.HighResolution, header_font=self.get_plugin_font('printer_header')) printDialog = QPrintDialog(...
python
def print_file(self): """Print current file""" editor = self.get_current_editor() filename = self.get_current_filename() printer = Printer(mode=QPrinter.HighResolution, header_font=self.get_plugin_font('printer_header')) printDialog = QPrintDialog(...
[ "def", "print_file", "(", "self", ")", ":", "editor", "=", "self", ".", "get_current_editor", "(", ")", "filename", "=", "self", ".", "get_current_filename", "(", ")", "printer", "=", "Printer", "(", "mode", "=", "QPrinter", ".", "HighResolution", ",", "he...
Print current file
[ "Print", "current", "file" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L1831-L1847
train
spyder-ide/spyder
spyder/plugins/editor/plugin.py
Editor.print_preview
def print_preview(self): """Print preview for current file""" from qtpy.QtPrintSupport import QPrintPreviewDialog editor = self.get_current_editor() printer = Printer(mode=QPrinter.HighResolution, header_font=self.get_plugin_font('printer_header')) ...
python
def print_preview(self): """Print preview for current file""" from qtpy.QtPrintSupport import QPrintPreviewDialog editor = self.get_current_editor() printer = Printer(mode=QPrinter.HighResolution, header_font=self.get_plugin_font('printer_header')) ...
[ "def", "print_preview", "(", "self", ")", ":", "from", "qtpy", ".", "QtPrintSupport", "import", "QPrintPreviewDialog", "editor", "=", "self", ".", "get_current_editor", "(", ")", "printer", "=", "Printer", "(", "mode", "=", "QPrinter", ".", "HighResolution", "...
Print preview for current file
[ "Print", "preview", "for", "current", "file" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L1850-L1862
train
spyder-ide/spyder
spyder/plugins/editor/plugin.py
Editor.save
def save(self, index=None, force=False): """Save file""" editorstack = self.get_current_editorstack() return editorstack.save(index=index, force=force)
python
def save(self, index=None, force=False): """Save file""" editorstack = self.get_current_editorstack() return editorstack.save(index=index, force=force)
[ "def", "save", "(", "self", ",", "index", "=", "None", ",", "force", "=", "False", ")", ":", "editorstack", "=", "self", ".", "get_current_editorstack", "(", ")", "return", "editorstack", ".", "save", "(", "index", "=", "index", ",", "force", "=", "for...
Save file
[ "Save", "file" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L1875-L1878
train
spyder-ide/spyder
spyder/plugins/editor/plugin.py
Editor.save_as
def save_as(self): """Save *as* the currently edited file""" editorstack = self.get_current_editorstack() if editorstack.save_as(): fname = editorstack.get_current_filename() self.__add_recent_file(fname)
python
def save_as(self): """Save *as* the currently edited file""" editorstack = self.get_current_editorstack() if editorstack.save_as(): fname = editorstack.get_current_filename() self.__add_recent_file(fname)
[ "def", "save_as", "(", "self", ")", ":", "editorstack", "=", "self", ".", "get_current_editorstack", "(", ")", "if", "editorstack", ".", "save_as", "(", ")", ":", "fname", "=", "editorstack", ".", "get_current_filename", "(", ")", "self", ".", "__add_recent_...
Save *as* the currently edited file
[ "Save", "*", "as", "*", "the", "currently", "edited", "file" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L1881-L1886
train
spyder-ide/spyder
spyder/plugins/editor/plugin.py
Editor.find
def find(self): """Find slot""" editorstack = self.get_current_editorstack() editorstack.find_widget.show() editorstack.find_widget.search_text.setFocus()
python
def find(self): """Find slot""" editorstack = self.get_current_editorstack() editorstack.find_widget.show() editorstack.find_widget.search_text.setFocus()
[ "def", "find", "(", "self", ")", ":", "editorstack", "=", "self", ".", "get_current_editorstack", "(", ")", "editorstack", ".", "find_widget", ".", "show", "(", ")", "editorstack", ".", "find_widget", ".", "search_text", ".", "setFocus", "(", ")" ]
Find slot
[ "Find", "slot" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L1906-L1910
train
spyder-ide/spyder
spyder/plugins/editor/plugin.py
Editor.open_last_closed
def open_last_closed(self): """ Reopens the last closed tab.""" editorstack = self.get_current_editorstack() last_closed_files = editorstack.get_last_closed_files() if (len(last_closed_files) > 0): file_to_open = last_closed_files[0] last_closed_files.remove...
python
def open_last_closed(self): """ Reopens the last closed tab.""" editorstack = self.get_current_editorstack() last_closed_files = editorstack.get_last_closed_files() if (len(last_closed_files) > 0): file_to_open = last_closed_files[0] last_closed_files.remove...
[ "def", "open_last_closed", "(", "self", ")", ":", "editorstack", "=", "self", ".", "get_current_editorstack", "(", ")", "last_closed_files", "=", "editorstack", ".", "get_last_closed_files", "(", ")", "if", "(", "len", "(", "last_closed_files", ")", ">", "0", ...
Reopens the last closed tab.
[ "Reopens", "the", "last", "closed", "tab", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L1930-L1938
train
spyder-ide/spyder
spyder/plugins/editor/plugin.py
Editor.close_file_from_name
def close_file_from_name(self, filename): """Close file from its name""" filename = osp.abspath(to_text_string(filename)) index = self.editorstacks[0].has_filename(filename) if index is not None: self.editorstacks[0].close_file(index)
python
def close_file_from_name(self, filename): """Close file from its name""" filename = osp.abspath(to_text_string(filename)) index = self.editorstacks[0].has_filename(filename) if index is not None: self.editorstacks[0].close_file(index)
[ "def", "close_file_from_name", "(", "self", ",", "filename", ")", ":", "filename", "=", "osp", ".", "abspath", "(", "to_text_string", "(", "filename", ")", ")", "index", "=", "self", ".", "editorstacks", "[", "0", "]", ".", "has_filename", "(", "filename",...
Close file from its name
[ "Close", "file", "from", "its", "name" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L1941-L1946
train
spyder-ide/spyder
spyder/plugins/editor/plugin.py
Editor.removed_tree
def removed_tree(self, dirname): """Directory was removed in project explorer widget""" dirname = osp.abspath(to_text_string(dirname)) for fname in self.get_filenames(): if osp.abspath(fname).startswith(dirname): self.close_file_from_name(fname)
python
def removed_tree(self, dirname): """Directory was removed in project explorer widget""" dirname = osp.abspath(to_text_string(dirname)) for fname in self.get_filenames(): if osp.abspath(fname).startswith(dirname): self.close_file_from_name(fname)
[ "def", "removed_tree", "(", "self", ",", "dirname", ")", ":", "dirname", "=", "osp", ".", "abspath", "(", "to_text_string", "(", "dirname", ")", ")", "for", "fname", "in", "self", ".", "get_filenames", "(", ")", ":", "if", "osp", ".", "abspath", "(", ...
Directory was removed in project explorer widget
[ "Directory", "was", "removed", "in", "project", "explorer", "widget" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L1952-L1957
train
spyder-ide/spyder
spyder/plugins/editor/plugin.py
Editor.renamed
def renamed(self, source, dest): """File was renamed in file explorer widget or in project explorer""" filename = osp.abspath(to_text_string(source)) index = self.editorstacks[0].has_filename(filename) if index is not None: for editorstack in self.editorstacks: ...
python
def renamed(self, source, dest): """File was renamed in file explorer widget or in project explorer""" filename = osp.abspath(to_text_string(source)) index = self.editorstacks[0].has_filename(filename) if index is not None: for editorstack in self.editorstacks: ...
[ "def", "renamed", "(", "self", ",", "source", ",", "dest", ")", ":", "filename", "=", "osp", ".", "abspath", "(", "to_text_string", "(", "source", ")", ")", "index", "=", "self", ".", "editorstacks", "[", "0", "]", ".", "has_filename", "(", "filename",...
File was renamed in file explorer widget or in project explorer
[ "File", "was", "renamed", "in", "file", "explorer", "widget", "or", "in", "project", "explorer" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L1959-L1966
train
spyder-ide/spyder
spyder/plugins/editor/plugin.py
Editor.renamed_tree
def renamed_tree(self, source, dest): """Directory was renamed in file explorer or in project explorer.""" dirname = osp.abspath(to_text_string(source)) tofile = to_text_string(dest) for fname in self.get_filenames(): if osp.abspath(fname).startswith(dirname): ...
python
def renamed_tree(self, source, dest): """Directory was renamed in file explorer or in project explorer.""" dirname = osp.abspath(to_text_string(source)) tofile = to_text_string(dest) for fname in self.get_filenames(): if osp.abspath(fname).startswith(dirname): ...
[ "def", "renamed_tree", "(", "self", ",", "source", ",", "dest", ")", ":", "dirname", "=", "osp", ".", "abspath", "(", "to_text_string", "(", "source", ")", ")", "tofile", "=", "to_text_string", "(", "dest", ")", "for", "fname", "in", "self", ".", "get_...
Directory was renamed in file explorer or in project explorer.
[ "Directory", "was", "renamed", "in", "file", "explorer", "or", "in", "project", "explorer", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L1968-L1975
train
spyder-ide/spyder
spyder/plugins/editor/plugin.py
Editor.run_winpdb
def run_winpdb(self): """Run winpdb to debug current file""" if self.save(): fname = self.get_current_filename() runconf = get_run_configuration(fname) if runconf is None: args = [] wdir = None else: ...
python
def run_winpdb(self): """Run winpdb to debug current file""" if self.save(): fname = self.get_current_filename() runconf = get_run_configuration(fname) if runconf is None: args = [] wdir = None else: ...
[ "def", "run_winpdb", "(", "self", ")", ":", "if", "self", ".", "save", "(", ")", ":", "fname", "=", "self", ".", "get_current_filename", "(", ")", "runconf", "=", "get_run_configuration", "(", "fname", ")", "if", "runconf", "is", "None", ":", "args", "...
Run winpdb to debug current file
[ "Run", "winpdb", "to", "debug", "current", "file" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L2051-L2066
train
spyder-ide/spyder
spyder/plugins/editor/plugin.py
Editor.cursor_moved
def cursor_moved(self, filename0, position0, filename1, position1): """Cursor was just moved: 'go to'""" if position0 is not None: self.add_cursor_position_to_history(filename0, position0) self.add_cursor_position_to_history(filename1, position1)
python
def cursor_moved(self, filename0, position0, filename1, position1): """Cursor was just moved: 'go to'""" if position0 is not None: self.add_cursor_position_to_history(filename0, position0) self.add_cursor_position_to_history(filename1, position1)
[ "def", "cursor_moved", "(", "self", ",", "filename0", ",", "position0", ",", "filename1", ",", "position1", ")", ":", "if", "position0", "is", "not", "None", ":", "self", ".", "add_cursor_position_to_history", "(", "filename0", ",", "position0", ")", "self", ...
Cursor was just moved: 'go to
[ "Cursor", "was", "just", "moved", ":", "go", "to" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L2119-L2123
train
spyder-ide/spyder
spyder/plugins/editor/plugin.py
Editor.go_to_line
def go_to_line(self, line=None): """Open 'go to line' dialog""" editorstack = self.get_current_editorstack() if editorstack is not None: editorstack.go_to_line(line)
python
def go_to_line(self, line=None): """Open 'go to line' dialog""" editorstack = self.get_current_editorstack() if editorstack is not None: editorstack.go_to_line(line)
[ "def", "go_to_line", "(", "self", ",", "line", "=", "None", ")", ":", "editorstack", "=", "self", ".", "get_current_editorstack", "(", ")", "if", "editorstack", "is", "not", "None", ":", "editorstack", ".", "go_to_line", "(", "line", ")" ]
Open 'go to line' dialog
[ "Open", "go", "to", "line", "dialog" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L2182-L2186
train
spyder-ide/spyder
spyder/plugins/editor/plugin.py
Editor.set_or_clear_breakpoint
def set_or_clear_breakpoint(self): """Set/Clear breakpoint""" editorstack = self.get_current_editorstack() if editorstack is not None: self.switch_to_plugin() editorstack.set_or_clear_breakpoint()
python
def set_or_clear_breakpoint(self): """Set/Clear breakpoint""" editorstack = self.get_current_editorstack() if editorstack is not None: self.switch_to_plugin() editorstack.set_or_clear_breakpoint()
[ "def", "set_or_clear_breakpoint", "(", "self", ")", ":", "editorstack", "=", "self", ".", "get_current_editorstack", "(", ")", "if", "editorstack", "is", "not", "None", ":", "self", ".", "switch_to_plugin", "(", ")", "editorstack", ".", "set_or_clear_breakpoint", ...
Set/Clear breakpoint
[ "Set", "/", "Clear", "breakpoint" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L2189-L2194
train
spyder-ide/spyder
spyder/plugins/editor/plugin.py
Editor.set_or_edit_conditional_breakpoint
def set_or_edit_conditional_breakpoint(self): """Set/Edit conditional breakpoint""" editorstack = self.get_current_editorstack() if editorstack is not None: self.switch_to_plugin() editorstack.set_or_edit_conditional_breakpoint()
python
def set_or_edit_conditional_breakpoint(self): """Set/Edit conditional breakpoint""" editorstack = self.get_current_editorstack() if editorstack is not None: self.switch_to_plugin() editorstack.set_or_edit_conditional_breakpoint()
[ "def", "set_or_edit_conditional_breakpoint", "(", "self", ")", ":", "editorstack", "=", "self", ".", "get_current_editorstack", "(", ")", "if", "editorstack", "is", "not", "None", ":", "self", ".", "switch_to_plugin", "(", ")", "editorstack", ".", "set_or_edit_con...
Set/Edit conditional breakpoint
[ "Set", "/", "Edit", "conditional", "breakpoint" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L2197-L2202
train
spyder-ide/spyder
spyder/plugins/editor/plugin.py
Editor.clear_all_breakpoints
def clear_all_breakpoints(self): """Clear breakpoints in all files""" self.switch_to_plugin() clear_all_breakpoints() self.breakpoints_saved.emit() editorstack = self.get_current_editorstack() if editorstack is not None: for data in editorstack.data: ...
python
def clear_all_breakpoints(self): """Clear breakpoints in all files""" self.switch_to_plugin() clear_all_breakpoints() self.breakpoints_saved.emit() editorstack = self.get_current_editorstack() if editorstack is not None: for data in editorstack.data: ...
[ "def", "clear_all_breakpoints", "(", "self", ")", ":", "self", ".", "switch_to_plugin", "(", ")", "clear_all_breakpoints", "(", ")", "self", ".", "breakpoints_saved", ".", "emit", "(", ")", "editorstack", "=", "self", ".", "get_current_editorstack", "(", ")", ...
Clear breakpoints in all files
[ "Clear", "breakpoints", "in", "all", "files" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L2205-L2214
train
spyder-ide/spyder
spyder/plugins/editor/plugin.py
Editor.clear_breakpoint
def clear_breakpoint(self, filename, lineno): """Remove a single breakpoint""" clear_breakpoint(filename, lineno) self.breakpoints_saved.emit() editorstack = self.get_current_editorstack() if editorstack is not None: index = self.is_file_opened(filename) ...
python
def clear_breakpoint(self, filename, lineno): """Remove a single breakpoint""" clear_breakpoint(filename, lineno) self.breakpoints_saved.emit() editorstack = self.get_current_editorstack() if editorstack is not None: index = self.is_file_opened(filename) ...
[ "def", "clear_breakpoint", "(", "self", ",", "filename", ",", "lineno", ")", ":", "clear_breakpoint", "(", "filename", ",", "lineno", ")", "self", ".", "breakpoints_saved", ".", "emit", "(", ")", "editorstack", "=", "self", ".", "get_current_editorstack", "(",...
Remove a single breakpoint
[ "Remove", "a", "single", "breakpoint" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L2216-L2225
train
spyder-ide/spyder
spyder/plugins/editor/plugin.py
Editor.debug_command
def debug_command(self, command): """Debug actions""" self.switch_to_plugin() self.main.ipyconsole.write_to_stdin(command) focus_widget = self.main.ipyconsole.get_focus_widget() if focus_widget: focus_widget.setFocus()
python
def debug_command(self, command): """Debug actions""" self.switch_to_plugin() self.main.ipyconsole.write_to_stdin(command) focus_widget = self.main.ipyconsole.get_focus_widget() if focus_widget: focus_widget.setFocus()
[ "def", "debug_command", "(", "self", ",", "command", ")", ":", "self", ".", "switch_to_plugin", "(", ")", "self", ".", "main", ".", "ipyconsole", ".", "write_to_stdin", "(", "command", ")", "focus_widget", "=", "self", ".", "main", ".", "ipyconsole", ".", ...
Debug actions
[ "Debug", "actions" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L2227-L2233
train
spyder-ide/spyder
spyder/plugins/editor/plugin.py
Editor.run_file
def run_file(self, debug=False): """Run script inside current interpreter or in a new one""" editorstack = self.get_current_editorstack() if editorstack.save(): editor = self.get_current_editor() fname = osp.abspath(self.get_current_filename()) # Get f...
python
def run_file(self, debug=False): """Run script inside current interpreter or in a new one""" editorstack = self.get_current_editorstack() if editorstack.save(): editor = self.get_current_editor() fname = osp.abspath(self.get_current_filename()) # Get f...
[ "def", "run_file", "(", "self", ",", "debug", "=", "False", ")", ":", "editorstack", "=", "self", ".", "get_current_editorstack", "(", ")", "if", "editorstack", ".", "save", "(", ")", ":", "editor", "=", "self", ".", "get_current_editor", "(", ")", "fnam...
Run script inside current interpreter or in a new one
[ "Run", "script", "inside", "current", "interpreter", "or", "in", "a", "new", "one" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L2251-L2317
train
spyder-ide/spyder
spyder/plugins/editor/plugin.py
Editor.debug_file
def debug_file(self): """Debug current script""" self.switch_to_plugin() current_editor = self.get_current_editor() if current_editor is not None: current_editor.sig_debug_start.emit() self.run_file(debug=True)
python
def debug_file(self): """Debug current script""" self.switch_to_plugin() current_editor = self.get_current_editor() if current_editor is not None: current_editor.sig_debug_start.emit() self.run_file(debug=True)
[ "def", "debug_file", "(", "self", ")", ":", "self", ".", "switch_to_plugin", "(", ")", "current_editor", "=", "self", ".", "get_current_editor", "(", ")", "if", "current_editor", "is", "not", "None", ":", "current_editor", ".", "sig_debug_start", ".", "emit", ...
Debug current script
[ "Debug", "current", "script" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L2323-L2329
train
spyder-ide/spyder
spyder/plugins/editor/plugin.py
Editor.re_run_file
def re_run_file(self): """Re-run last script""" if self.get_option('save_all_before_run'): self.save_all() if self.__last_ec_exec is None: return (fname, wdir, args, interact, debug, python, python_args, current, systerm, post_mortem, cle...
python
def re_run_file(self): """Re-run last script""" if self.get_option('save_all_before_run'): self.save_all() if self.__last_ec_exec is None: return (fname, wdir, args, interact, debug, python, python_args, current, systerm, post_mortem, cle...
[ "def", "re_run_file", "(", "self", ")", ":", "if", "self", ".", "get_option", "(", "'save_all_before_run'", ")", ":", "self", ".", "save_all", "(", ")", "if", "self", ".", "__last_ec_exec", "is", "None", ":", "return", "(", "fname", ",", "wdir", ",", "...
Re-run last script
[ "Re", "-", "run", "last", "script" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L2332-L2348
train
spyder-ide/spyder
spyder/plugins/editor/plugin.py
Editor.save_bookmark
def save_bookmark(self, slot_num): """Save current line and position as bookmark.""" bookmarks = CONF.get('editor', 'bookmarks') editorstack = self.get_current_editorstack() if slot_num in bookmarks: filename, line_num, column = bookmarks[slot_num] if osp.is...
python
def save_bookmark(self, slot_num): """Save current line and position as bookmark.""" bookmarks = CONF.get('editor', 'bookmarks') editorstack = self.get_current_editorstack() if slot_num in bookmarks: filename, line_num, column = bookmarks[slot_num] if osp.is...
[ "def", "save_bookmark", "(", "self", ",", "slot_num", ")", ":", "bookmarks", "=", "CONF", ".", "get", "(", "'editor'", ",", "'bookmarks'", ")", "editorstack", "=", "self", ".", "get_current_editorstack", "(", ")", "if", "slot_num", "in", "bookmarks", ":", ...
Save current line and position as bookmark.
[ "Save", "current", "line", "and", "position", "as", "bookmark", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L2376-L2390
train
spyder-ide/spyder
spyder/plugins/editor/plugin.py
Editor.load_bookmark
def load_bookmark(self, slot_num): """Set cursor to bookmarked file and position.""" bookmarks = CONF.get('editor', 'bookmarks') if slot_num in bookmarks: filename, line_num, column = bookmarks[slot_num] else: return if not osp.isfile(filename): ...
python
def load_bookmark(self, slot_num): """Set cursor to bookmarked file and position.""" bookmarks = CONF.get('editor', 'bookmarks') if slot_num in bookmarks: filename, line_num, column = bookmarks[slot_num] else: return if not osp.isfile(filename): ...
[ "def", "load_bookmark", "(", "self", ",", "slot_num", ")", ":", "bookmarks", "=", "CONF", ".", "get", "(", "'editor'", ",", "'bookmarks'", ")", "if", "slot_num", "in", "bookmarks", ":", "filename", ",", "line_num", ",", "column", "=", "bookmarks", "[", "...
Set cursor to bookmarked file and position.
[ "Set", "cursor", "to", "bookmarked", "file", "and", "position", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L2393-L2412
train
spyder-ide/spyder
spyder/plugins/editor/plugin.py
Editor.zoom
def zoom(self, factor): """Zoom in/out/reset""" editor = self.get_current_editorstack().get_current_editor() if factor == 0: font = self.get_plugin_font() editor.set_font(font) else: font = editor.font() size = font.pointSize() + fa...
python
def zoom(self, factor): """Zoom in/out/reset""" editor = self.get_current_editorstack().get_current_editor() if factor == 0: font = self.get_plugin_font() editor.set_font(font) else: font = editor.font() size = font.pointSize() + fa...
[ "def", "zoom", "(", "self", ",", "factor", ")", ":", "editor", "=", "self", ".", "get_current_editorstack", "(", ")", ".", "get_current_editor", "(", ")", "if", "factor", "==", "0", ":", "font", "=", "self", ".", "get_plugin_font", "(", ")", "editor", ...
Zoom in/out/reset
[ "Zoom", "in", "/", "out", "/", "reset" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L2415-L2427
train
spyder-ide/spyder
spyder/plugins/editor/plugin.py
Editor.apply_plugin_settings
def apply_plugin_settings(self, options): """Apply configuration file's plugin settings""" if self.editorstacks is not None: # --- syntax highlight and text rendering settings color_scheme_n = 'color_scheme_name' color_scheme_o = self.get_color_scheme() ...
python
def apply_plugin_settings(self, options): """Apply configuration file's plugin settings""" if self.editorstacks is not None: # --- syntax highlight and text rendering settings color_scheme_n = 'color_scheme_name' color_scheme_o = self.get_color_scheme() ...
[ "def", "apply_plugin_settings", "(", "self", ",", "options", ")", ":", "if", "self", ".", "editorstacks", "is", "not", "None", ":", "# --- syntax highlight and text rendering settings\r", "color_scheme_n", "=", "'color_scheme_name'", "color_scheme_o", "=", "self", ".", ...
Apply configuration file's plugin settings
[ "Apply", "configuration", "file", "s", "plugin", "settings" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L2430-L2574
train
spyder-ide/spyder
spyder/plugins/editor/plugin.py
Editor.get_open_filenames
def get_open_filenames(self): """Get the list of open files in the current stack""" editorstack = self.editorstacks[0] filenames = [] filenames += [finfo.filename for finfo in editorstack.data] return filenames
python
def get_open_filenames(self): """Get the list of open files in the current stack""" editorstack = self.editorstacks[0] filenames = [] filenames += [finfo.filename for finfo in editorstack.data] return filenames
[ "def", "get_open_filenames", "(", "self", ")", ":", "editorstack", "=", "self", ".", "editorstacks", "[", "0", "]", "filenames", "=", "[", "]", "filenames", "+=", "[", "finfo", ".", "filename", "for", "finfo", "in", "editorstack", ".", "data", "]", "retu...
Get the list of open files in the current stack
[ "Get", "the", "list", "of", "open", "files", "in", "the", "current", "stack" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L2577-L2582
train
spyder-ide/spyder
spyder/plugins/editor/plugin.py
Editor.set_open_filenames
def set_open_filenames(self): """ Set the recent opened files on editor based on active project. If no project is active, then editor filenames are saved, otherwise the opened filenames are stored in the project config info. """ if self.projects is not None: ...
python
def set_open_filenames(self): """ Set the recent opened files on editor based on active project. If no project is active, then editor filenames are saved, otherwise the opened filenames are stored in the project config info. """ if self.projects is not None: ...
[ "def", "set_open_filenames", "(", "self", ")", ":", "if", "self", ".", "projects", "is", "not", "None", ":", "if", "not", "self", ".", "projects", ".", "get_active_project", "(", ")", ":", "filenames", "=", "self", ".", "get_open_filenames", "(", ")", "s...
Set the recent opened files on editor based on active project. If no project is active, then editor filenames are saved, otherwise the opened filenames are stored in the project config info.
[ "Set", "the", "recent", "opened", "files", "on", "editor", "based", "on", "active", "project", ".", "If", "no", "project", "is", "active", "then", "editor", "filenames", "are", "saved", "otherwise", "the", "opened", "filenames", "are", "stored", "in", "the",...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L2584-L2594
train
spyder-ide/spyder
spyder/plugins/editor/plugin.py
Editor.setup_open_files
def setup_open_files(self): """ Open the list of saved files per project. Also open any files that the user selected in the recovery dialog. """ self.set_create_new_file_if_empty(False) active_project_path = None if self.projects is not None: ...
python
def setup_open_files(self): """ Open the list of saved files per project. Also open any files that the user selected in the recovery dialog. """ self.set_create_new_file_if_empty(False) active_project_path = None if self.projects is not None: ...
[ "def", "setup_open_files", "(", "self", ")", ":", "self", ".", "set_create_new_file_if_empty", "(", "False", ")", "active_project_path", "=", "None", "if", "self", ".", "projects", "is", "not", "None", ":", "active_project_path", "=", "self", ".", "projects", ...
Open the list of saved files per project. Also open any files that the user selected in the recovery dialog.
[ "Open", "the", "list", "of", "saved", "files", "per", "project", ".", "Also", "open", "any", "files", "that", "the", "user", "selected", "in", "the", "recovery", "dialog", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L2596-L2666
train
spyder-ide/spyder
spyder/plugins/console/utils/interpreter.py
guess_filename
def guess_filename(filename): """Guess filename""" if osp.isfile(filename): return filename if not filename.endswith('.py'): filename += '.py' for path in [getcwd_or_home()] + sys.path: fname = osp.join(path, filename) if osp.isfile(fname): return fna...
python
def guess_filename(filename): """Guess filename""" if osp.isfile(filename): return filename if not filename.endswith('.py'): filename += '.py' for path in [getcwd_or_home()] + sys.path: fname = osp.join(path, filename) if osp.isfile(fname): return fna...
[ "def", "guess_filename", "(", "filename", ")", ":", "if", "osp", ".", "isfile", "(", "filename", ")", ":", "return", "filename", "if", "not", "filename", ".", "endswith", "(", "'.py'", ")", ":", "filename", "+=", "'.py'", "for", "path", "in", "[", "get...
Guess filename
[ "Guess", "filename" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/console/utils/interpreter.py#L32-L46
train
spyder-ide/spyder
spyder/plugins/console/utils/interpreter.py
Interpreter.redirect_stds
def redirect_stds(self): """Redirects stds""" if not self.debug: sys.stdout = self.stdout_write sys.stderr = self.stderr_write sys.stdin = self.stdin_read
python
def redirect_stds(self): """Redirects stds""" if not self.debug: sys.stdout = self.stdout_write sys.stderr = self.stderr_write sys.stdin = self.stdin_read
[ "def", "redirect_stds", "(", "self", ")", ":", "if", "not", "self", ".", "debug", ":", "sys", ".", "stdout", "=", "self", ".", "stdout_write", "sys", ".", "stderr", "=", "self", ".", "stderr_write", "sys", ".", "stdin", "=", "self", ".", "stdin_read" ]
Redirects stds
[ "Redirects", "stds" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/console/utils/interpreter.py#L98-L103
train
spyder-ide/spyder
spyder/plugins/console/utils/interpreter.py
Interpreter.restore_stds
def restore_stds(self): """Restore stds""" if not self.debug: sys.stdout = self.initial_stdout sys.stderr = self.initial_stderr sys.stdin = self.initial_stdin
python
def restore_stds(self): """Restore stds""" if not self.debug: sys.stdout = self.initial_stdout sys.stderr = self.initial_stderr sys.stdin = self.initial_stdin
[ "def", "restore_stds", "(", "self", ")", ":", "if", "not", "self", ".", "debug", ":", "sys", ".", "stdout", "=", "self", ".", "initial_stdout", "sys", ".", "stderr", "=", "self", ".", "initial_stderr", "sys", ".", "stdin", "=", "self", ".", "initial_st...
Restore stds
[ "Restore", "stds" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/console/utils/interpreter.py#L105-L110
train
spyder-ide/spyder
spyder/plugins/console/utils/interpreter.py
Interpreter.raw_input_replacement
def raw_input_replacement(self, prompt=''): """For raw_input builtin function emulation""" self.widget_proxy.wait_input(prompt) self.input_condition.acquire() while not self.widget_proxy.data_available(): self.input_condition.wait() inp = self.widget_proxy.input...
python
def raw_input_replacement(self, prompt=''): """For raw_input builtin function emulation""" self.widget_proxy.wait_input(prompt) self.input_condition.acquire() while not self.widget_proxy.data_available(): self.input_condition.wait() inp = self.widget_proxy.input...
[ "def", "raw_input_replacement", "(", "self", ",", "prompt", "=", "''", ")", ":", "self", ".", "widget_proxy", ".", "wait_input", "(", "prompt", ")", "self", ".", "input_condition", ".", "acquire", "(", ")", "while", "not", "self", ".", "widget_proxy", ".",...
For raw_input builtin function emulation
[ "For", "raw_input", "builtin", "function", "emulation" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/console/utils/interpreter.py#L112-L120
train
spyder-ide/spyder
spyder/plugins/console/utils/interpreter.py
Interpreter.help_replacement
def help_replacement(self, text=None, interactive=False): """For help builtin function emulation""" if text is not None and not interactive: return pydoc.help(text) elif text is None: pyver = "%d.%d" % (sys.version_info[0], sys.version_info[1]) self.writ...
python
def help_replacement(self, text=None, interactive=False): """For help builtin function emulation""" if text is not None and not interactive: return pydoc.help(text) elif text is None: pyver = "%d.%d" % (sys.version_info[0], sys.version_info[1]) self.writ...
[ "def", "help_replacement", "(", "self", ",", "text", "=", "None", ",", "interactive", "=", "False", ")", ":", "if", "text", "is", "not", "None", "and", "not", "interactive", ":", "return", "pydoc", ".", "help", "(", "text", ")", "elif", "text", "is", ...
For help builtin function emulation
[ "For", "help", "builtin", "function", "emulation" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/console/utils/interpreter.py#L122-L160
train
spyder-ide/spyder
spyder/plugins/console/utils/interpreter.py
Interpreter.run_command
def run_command(self, cmd, new_prompt=True): """Run command in interpreter""" if cmd == 'exit()': self.exit_flag = True self.write('\n') return # -- Special commands type I # (transformed into commands executed in the interpreter) # ...
python
def run_command(self, cmd, new_prompt=True): """Run command in interpreter""" if cmd == 'exit()': self.exit_flag = True self.write('\n') return # -- Special commands type I # (transformed into commands executed in the interpreter) # ...
[ "def", "run_command", "(", "self", ",", "cmd", ",", "new_prompt", "=", "True", ")", ":", "if", "cmd", "==", "'exit()'", ":", "self", ".", "exit_flag", "=", "True", "self", ".", "write", "(", "'\\n'", ")", "return", "# -- Special commands type I\r", "# (...
Run command in interpreter
[ "Run", "command", "in", "interpreter" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/console/utils/interpreter.py#L162-L233
train
spyder-ide/spyder
spyder/plugins/console/utils/interpreter.py
Interpreter.get_thread_id
def get_thread_id(self): """Return thread id""" if self._id is None: for thread_id, obj in list(threading._active.items()): if obj is self: self._id = thread_id return self._id
python
def get_thread_id(self): """Return thread id""" if self._id is None: for thread_id, obj in list(threading._active.items()): if obj is self: self._id = thread_id return self._id
[ "def", "get_thread_id", "(", "self", ")", ":", "if", "self", ".", "_id", "is", "None", ":", "for", "thread_id", ",", "obj", "in", "list", "(", "threading", ".", "_active", ".", "items", "(", ")", ")", ":", "if", "obj", "is", "self", ":", "self", ...
Return thread id
[ "Return", "thread", "id" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/console/utils/interpreter.py#L247-L253
train
spyder-ide/spyder
spyder/plugins/console/utils/interpreter.py
Interpreter.execfile
def execfile(self, filename): """Exec filename""" source = open(filename, 'r').read() try: try: name = filename.encode('ascii') except UnicodeEncodeError: name = '<executed_script>' code = compile(source, name, "exec") ...
python
def execfile(self, filename): """Exec filename""" source = open(filename, 'r').read() try: try: name = filename.encode('ascii') except UnicodeEncodeError: name = '<executed_script>' code = compile(source, name, "exec") ...
[ "def", "execfile", "(", "self", ",", "filename", ")", ":", "source", "=", "open", "(", "filename", ",", "'r'", ")", ".", "read", "(", ")", "try", ":", "try", ":", "name", "=", "filename", ".", "encode", "(", "'ascii'", ")", "except", "UnicodeEncodeEr...
Exec filename
[ "Exec", "filename" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/console/utils/interpreter.py#L268-L280
train
spyder-ide/spyder
spyder/plugins/console/utils/interpreter.py
Interpreter.runfile
def runfile(self, filename, args=None): """ Run filename args: command line arguments (string) """ if args is not None and not is_text_string(args): raise TypeError("expected a character buffer object") self.namespace['__file__'] = filename sys...
python
def runfile(self, filename, args=None): """ Run filename args: command line arguments (string) """ if args is not None and not is_text_string(args): raise TypeError("expected a character buffer object") self.namespace['__file__'] = filename sys...
[ "def", "runfile", "(", "self", ",", "filename", ",", "args", "=", "None", ")", ":", "if", "args", "is", "not", "None", "and", "not", "is_text_string", "(", "args", ")", ":", "raise", "TypeError", "(", "\"expected a character buffer object\"", ")", "self", ...
Run filename args: command line arguments (string)
[ "Run", "filename", "args", ":", "command", "line", "arguments", "(", "string", ")" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/console/utils/interpreter.py#L282-L296
train
spyder-ide/spyder
spyder/plugins/console/utils/interpreter.py
Interpreter.eval
def eval(self, text): """ Evaluate text and return (obj, valid) where *obj* is the object represented by *text* and *valid* is True if object evaluation did not raise any exception """ assert is_text_string(text) try: return eval(text, self.loc...
python
def eval(self, text): """ Evaluate text and return (obj, valid) where *obj* is the object represented by *text* and *valid* is True if object evaluation did not raise any exception """ assert is_text_string(text) try: return eval(text, self.loc...
[ "def", "eval", "(", "self", ",", "text", ")", ":", "assert", "is_text_string", "(", "text", ")", "try", ":", "return", "eval", "(", "text", ",", "self", ".", "locals", ")", ",", "True", "except", ":", "return", "None", ",", "False" ]
Evaluate text and return (obj, valid) where *obj* is the object represented by *text* and *valid* is True if object evaluation did not raise any exception
[ "Evaluate", "text", "and", "return", "(", "obj", "valid", ")", "where", "*", "obj", "*", "is", "the", "object", "represented", "by", "*", "text", "*", "and", "*", "valid", "*", "is", "True", "if", "object", "evaluation", "did", "not", "raise", "any", ...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/console/utils/interpreter.py#L298-L308
train
spyder-ide/spyder
spyder/plugins/console/utils/interpreter.py
Interpreter.is_defined
def is_defined(self, objtxt, force_import=False): """Return True if object is defined""" return isdefined(objtxt, force_import=force_import, namespace=self.locals)
python
def is_defined(self, objtxt, force_import=False): """Return True if object is defined""" return isdefined(objtxt, force_import=force_import, namespace=self.locals)
[ "def", "is_defined", "(", "self", ",", "objtxt", ",", "force_import", "=", "False", ")", ":", "return", "isdefined", "(", "objtxt", ",", "force_import", "=", "force_import", ",", "namespace", "=", "self", ".", "locals", ")" ]
Return True if object is defined
[ "Return", "True", "if", "object", "is", "defined" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/console/utils/interpreter.py#L310-L313
train
spyder-ide/spyder
spyder/plugins/variableexplorer/widgets/texteditor.py
TextEditor.text_changed
def text_changed(self): """Text has changed""" # Save text as bytes, if it was initially bytes if self.is_binary: self.text = to_binary_string(self.edit.toPlainText(), 'utf8') else: self.text = to_text_string(self.edit.toPlainText()) if self.btn_sav...
python
def text_changed(self): """Text has changed""" # Save text as bytes, if it was initially bytes if self.is_binary: self.text = to_binary_string(self.edit.toPlainText(), 'utf8') else: self.text = to_text_string(self.edit.toPlainText()) if self.btn_sav...
[ "def", "text_changed", "(", "self", ")", ":", "# Save text as bytes, if it was initially bytes\r", "if", "self", ".", "is_binary", ":", "self", ".", "text", "=", "to_binary_string", "(", "self", ".", "edit", ".", "toPlainText", "(", ")", ",", "'utf8'", ")", "e...
Text has changed
[ "Text", "has", "changed" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/variableexplorer/widgets/texteditor.py#L98-L108
train
spyder-ide/spyder
spyder/plugins/editor/lsp/transport/main.py
logger_init
def logger_init(level): """ Initialize the logger for this thread. Sets the log level to ERROR (0), WARNING (1), INFO (2), or DEBUG (3), depending on the argument `level`. """ levellist = [logging.ERROR, logging.WARNING, logging.INFO, logging.DEBUG] handler = logging.StreamHandler() fmt...
python
def logger_init(level): """ Initialize the logger for this thread. Sets the log level to ERROR (0), WARNING (1), INFO (2), or DEBUG (3), depending on the argument `level`. """ levellist = [logging.ERROR, logging.WARNING, logging.INFO, logging.DEBUG] handler = logging.StreamHandler() fmt...
[ "def", "logger_init", "(", "level", ")", ":", "levellist", "=", "[", "logging", ".", "ERROR", ",", "logging", ".", "WARNING", ",", "logging", ".", "INFO", ",", "logging", ".", "DEBUG", "]", "handler", "=", "logging", ".", "StreamHandler", "(", ")", "fm...
Initialize the logger for this thread. Sets the log level to ERROR (0), WARNING (1), INFO (2), or DEBUG (3), depending on the argument `level`.
[ "Initialize", "the", "logger", "for", "this", "thread", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/lsp/transport/main.py#L62-L76
train
spyder-ide/spyder
spyder/plugins/editor/lsp/transport/main.py
SignalManager.restore
def restore(self): """Restore signal handlers to their original settings.""" signal.signal(signal.SIGINT, self.original_sigint) signal.signal(signal.SIGTERM, self.original_sigterm) if os.name == 'nt': signal.signal(signal.SIGBREAK, self.original_sigbreak)
python
def restore(self): """Restore signal handlers to their original settings.""" signal.signal(signal.SIGINT, self.original_sigint) signal.signal(signal.SIGTERM, self.original_sigterm) if os.name == 'nt': signal.signal(signal.SIGBREAK, self.original_sigbreak)
[ "def", "restore", "(", "self", ")", ":", "signal", ".", "signal", "(", "signal", ".", "SIGINT", ",", "self", ".", "original_sigint", ")", "signal", ".", "signal", "(", "signal", ".", "SIGTERM", ",", "self", ".", "original_sigterm", ")", "if", "os", "."...
Restore signal handlers to their original settings.
[ "Restore", "signal", "handlers", "to", "their", "original", "settings", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/lsp/transport/main.py#L102-L107
train
spyder-ide/spyder
spyder/requirements.py
show_warning
def show_warning(message): """Show warning using Tkinter if available""" try: # If Tkinter is installed (highly probable), showing an error pop-up import Tkinter, tkMessageBox root = Tkinter.Tk() root.withdraw() tkMessageBox.showerror("Spyder", message) except...
python
def show_warning(message): """Show warning using Tkinter if available""" try: # If Tkinter is installed (highly probable), showing an error pop-up import Tkinter, tkMessageBox root = Tkinter.Tk() root.withdraw() tkMessageBox.showerror("Spyder", message) except...
[ "def", "show_warning", "(", "message", ")", ":", "try", ":", "# If Tkinter is installed (highly probable), showing an error pop-up\r", "import", "Tkinter", ",", "tkMessageBox", "root", "=", "Tkinter", ".", "Tk", "(", ")", "root", ".", "withdraw", "(", ")", "tkMessag...
Show warning using Tkinter if available
[ "Show", "warning", "using", "Tkinter", "if", "available" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/requirements.py#L14-L24
train
spyder-ide/spyder
spyder/requirements.py
check_path
def check_path(): """Check sys.path: is Spyder properly installed?""" dirname = osp.abspath(osp.join(osp.dirname(__file__), osp.pardir)) if dirname not in sys.path: show_warning("Spyder must be installed properly " "(e.g. from source: 'python setup.py install'),\n" ...
python
def check_path(): """Check sys.path: is Spyder properly installed?""" dirname = osp.abspath(osp.join(osp.dirname(__file__), osp.pardir)) if dirname not in sys.path: show_warning("Spyder must be installed properly " "(e.g. from source: 'python setup.py install'),\n" ...
[ "def", "check_path", "(", ")", ":", "dirname", "=", "osp", ".", "abspath", "(", "osp", ".", "join", "(", "osp", ".", "dirname", "(", "__file__", ")", ",", "osp", ".", "pardir", ")", ")", "if", "dirname", "not", "in", "sys", ".", "path", ":", "sho...
Check sys.path: is Spyder properly installed?
[ "Check", "sys", ".", "path", ":", "is", "Spyder", "properly", "installed?" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/requirements.py#L27-L34
train
spyder-ide/spyder
spyder/requirements.py
check_qt
def check_qt(): """Check Qt binding requirements""" qt_infos = dict(pyqt5=("PyQt5", "5.6")) try: import qtpy package_name, required_ver = qt_infos[qtpy.API] actual_ver = qtpy.PYQT_VERSION if LooseVersion(actual_ver) < LooseVersion(required_ver): show_warni...
python
def check_qt(): """Check Qt binding requirements""" qt_infos = dict(pyqt5=("PyQt5", "5.6")) try: import qtpy package_name, required_ver = qt_infos[qtpy.API] actual_ver = qtpy.PYQT_VERSION if LooseVersion(actual_ver) < LooseVersion(required_ver): show_warni...
[ "def", "check_qt", "(", ")", ":", "qt_infos", "=", "dict", "(", "pyqt5", "=", "(", "\"PyQt5\"", ",", "\"5.6\"", ")", ")", "try", ":", "import", "qtpy", "package_name", ",", "required_ver", "=", "qt_infos", "[", "qtpy", ".", "API", "]", "actual_ver", "=...
Check Qt binding requirements
[ "Check", "Qt", "binding", "requirements" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/requirements.py#L37-L54
train
spyder-ide/spyder
spyder/requirements.py
check_spyder_kernels
def check_spyder_kernels(): """Check spyder-kernel requirement.""" try: import spyder_kernels required_ver = '1.0.0' actual_ver = spyder_kernels.__version__ if LooseVersion(actual_ver) < LooseVersion(required_ver): show_warning("Please check Spyder installation...
python
def check_spyder_kernels(): """Check spyder-kernel requirement.""" try: import spyder_kernels required_ver = '1.0.0' actual_ver = spyder_kernels.__version__ if LooseVersion(actual_ver) < LooseVersion(required_ver): show_warning("Please check Spyder installation...
[ "def", "check_spyder_kernels", "(", ")", ":", "try", ":", "import", "spyder_kernels", "required_ver", "=", "'1.0.0'", "actual_ver", "=", "spyder_kernels", ".", "__version__", "if", "LooseVersion", "(", "actual_ver", ")", "<", "LooseVersion", "(", "required_ver", "...
Check spyder-kernel requirement.
[ "Check", "spyder", "-", "kernel", "requirement", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/requirements.py#L57-L70
train
spyder-ide/spyder
spyder/plugins/breakpoints/plugin.py
Breakpoints.register_plugin
def register_plugin(self): """Register plugin in Spyder's main window""" self.breakpoints.edit_goto.connect(self.main.editor.load) #self.redirect_stdio.connect(self.main.redirect_internalshell_stdio) self.breakpoints.clear_all_breakpoints.connect( ...
python
def register_plugin(self): """Register plugin in Spyder's main window""" self.breakpoints.edit_goto.connect(self.main.editor.load) #self.redirect_stdio.connect(self.main.redirect_internalshell_stdio) self.breakpoints.clear_all_breakpoints.connect( ...
[ "def", "register_plugin", "(", "self", ")", ":", "self", ".", "breakpoints", ".", "edit_goto", ".", "connect", "(", "self", ".", "main", ".", "editor", ".", "load", ")", "#self.redirect_stdio.connect(self.main.redirect_internalshell_stdio)\r", "self", ".", "breakpoi...
Register plugin in Spyder's main window
[ "Register", "plugin", "in", "Spyder", "s", "main", "window" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/breakpoints/plugin.py#L77-L96
train
spyder-ide/spyder
spyder/utils/external/lockfile.py
isLocked
def isLocked(name): """Determine if the lock of the given name is held or not. @type name: C{str} @param name: The filesystem path to the lock to test @rtype: C{bool} @return: True if the lock is held, False otherwise. """ l = FilesystemLock(name) result = None try: ...
python
def isLocked(name): """Determine if the lock of the given name is held or not. @type name: C{str} @param name: The filesystem path to the lock to test @rtype: C{bool} @return: True if the lock is held, False otherwise. """ l = FilesystemLock(name) result = None try: ...
[ "def", "isLocked", "(", "name", ")", ":", "l", "=", "FilesystemLock", "(", "name", ")", "result", "=", "None", "try", ":", "result", "=", "l", ".", "lock", "(", ")", "finally", ":", "if", "result", ":", "l", ".", "unlock", "(", ")", "return", "no...
Determine if the lock of the given name is held or not. @type name: C{str} @param name: The filesystem path to the lock to test @rtype: C{bool} @return: True if the lock is held, False otherwise.
[ "Determine", "if", "the", "lock", "of", "the", "given", "name", "is", "held", "or", "not", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/utils/external/lockfile.py#L248-L264
train
spyder-ide/spyder
spyder/utils/external/lockfile.py
FilesystemLock.lock
def lock(self): """ Acquire this lock. @rtype: C{bool} @return: True if the lock is acquired, false otherwise. @raise: Any exception os.symlink() may raise, other than EEXIST. """ clean = True while True: try: ...
python
def lock(self): """ Acquire this lock. @rtype: C{bool} @return: True if the lock is acquired, false otherwise. @raise: Any exception os.symlink() may raise, other than EEXIST. """ clean = True while True: try: ...
[ "def", "lock", "(", "self", ")", ":", "clean", "=", "True", "while", "True", ":", "try", ":", "symlink", "(", "str", "(", "os", ".", "getpid", "(", ")", ")", ",", "self", ".", "name", ")", "except", "OSError", "as", "e", ":", "if", "_windows", ...
Acquire this lock. @rtype: C{bool} @return: True if the lock is acquired, false otherwise. @raise: Any exception os.symlink() may raise, other than EEXIST.
[ "Acquire", "this", "lock", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/utils/external/lockfile.py#L152-L230
train
spyder-ide/spyder
spyder/utils/external/lockfile.py
FilesystemLock.unlock
def unlock(self): """ Release this lock. This deletes the directory with the given name. @raise: Any exception os.readlink() may raise, or ValueError if the lock is not owned by this process. """ pid = readlink(self.name) if int(pid) != os.getp...
python
def unlock(self): """ Release this lock. This deletes the directory with the given name. @raise: Any exception os.readlink() may raise, or ValueError if the lock is not owned by this process. """ pid = readlink(self.name) if int(pid) != os.getp...
[ "def", "unlock", "(", "self", ")", ":", "pid", "=", "readlink", "(", "self", ".", "name", ")", "if", "int", "(", "pid", ")", "!=", "os", ".", "getpid", "(", ")", ":", "raise", "ValueError", "(", "\"Lock %r not owned by this process\"", "%", "(", "self"...
Release this lock. This deletes the directory with the given name. @raise: Any exception os.readlink() may raise, or ValueError if the lock is not owned by this process.
[ "Release", "this", "lock", ".", "This", "deletes", "the", "directory", "with", "the", "given", "name", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/utils/external/lockfile.py#L232-L245
train
spyder-ide/spyder
spyder/plugins/help/utils/sphinxthread.py
SphinxThread.render
def render(self, doc, context=None, math_option=False, img_path='', css_path=CSS_PATH): """Start thread to render a given documentation""" # If the thread is already running wait for it to finish before # starting it again. if self.wait(): self.doc = doc ...
python
def render(self, doc, context=None, math_option=False, img_path='', css_path=CSS_PATH): """Start thread to render a given documentation""" # If the thread is already running wait for it to finish before # starting it again. if self.wait(): self.doc = doc ...
[ "def", "render", "(", "self", ",", "doc", ",", "context", "=", "None", ",", "math_option", "=", "False", ",", "img_path", "=", "''", ",", "css_path", "=", "CSS_PATH", ")", ":", "# If the thread is already running wait for it to finish before", "# starting it again."...
Start thread to render a given documentation
[ "Start", "thread", "to", "render", "a", "given", "documentation" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/help/utils/sphinxthread.py#L48-L60
train
spyder-ide/spyder
spyder/preferences/languageserver.py
LSPServersModel.sortByName
def sortByName(self): """Qt Override.""" self.servers = sorted(self.servers, key=lambda x: x.language) self.reset()
python
def sortByName(self): """Qt Override.""" self.servers = sorted(self.servers, key=lambda x: x.language) self.reset()
[ "def", "sortByName", "(", "self", ")", ":", "self", ".", "servers", "=", "sorted", "(", "self", ".", "servers", ",", "key", "=", "lambda", "x", ":", "x", ".", "language", ")", "self", ".", "reset", "(", ")" ]
Qt Override.
[ "Qt", "Override", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/preferences/languageserver.py#L413-L416
train
spyder-ide/spyder
spyder/preferences/languageserver.py
LSPServersModel.data
def data(self, index, role=Qt.DisplayRole): """Qt Override.""" row = index.row() if not index.isValid() or not (0 <= row < len(self.servers)): return to_qvariant() server = self.servers[row] column = index.column() if role == Qt.DisplayRole: if c...
python
def data(self, index, role=Qt.DisplayRole): """Qt Override.""" row = index.row() if not index.isValid() or not (0 <= row < len(self.servers)): return to_qvariant() server = self.servers[row] column = index.column() if role == Qt.DisplayRole: if c...
[ "def", "data", "(", "self", ",", "index", ",", "role", "=", "Qt", ".", "DisplayRole", ")", ":", "row", "=", "index", ".", "row", "(", ")", "if", "not", "index", ".", "isValid", "(", ")", "or", "not", "(", "0", "<=", "row", "<", "len", "(", "s...
Qt Override.
[ "Qt", "Override", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/preferences/languageserver.py#L424-L447
train
spyder-ide/spyder
spyder/preferences/languageserver.py
LSPServersModel.headerData
def headerData(self, section, orientation, role=Qt.DisplayRole): """Qt Override.""" if role == Qt.TextAlignmentRole: if orientation == Qt.Horizontal: return to_qvariant(int(Qt.AlignHCenter | Qt.AlignVCenter)) return to_qvariant(int(Qt.AlignRight | Qt.AlignVCenter)...
python
def headerData(self, section, orientation, role=Qt.DisplayRole): """Qt Override.""" if role == Qt.TextAlignmentRole: if orientation == Qt.Horizontal: return to_qvariant(int(Qt.AlignHCenter | Qt.AlignVCenter)) return to_qvariant(int(Qt.AlignRight | Qt.AlignVCenter)...
[ "def", "headerData", "(", "self", ",", "section", ",", "orientation", ",", "role", "=", "Qt", ".", "DisplayRole", ")", ":", "if", "role", "==", "Qt", ".", "TextAlignmentRole", ":", "if", "orientation", "==", "Qt", ".", "Horizontal", ":", "return", "to_qv...
Qt Override.
[ "Qt", "Override", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/preferences/languageserver.py#L449-L464
train
spyder-ide/spyder
spyder/preferences/languageserver.py
LSPServerTable.focusInEvent
def focusInEvent(self, e): """Qt Override.""" super(LSPServerTable, self).focusInEvent(e) self.selectRow(self.currentIndex().row())
python
def focusInEvent(self, e): """Qt Override.""" super(LSPServerTable, self).focusInEvent(e) self.selectRow(self.currentIndex().row())
[ "def", "focusInEvent", "(", "self", ",", "e", ")", ":", "super", "(", "LSPServerTable", ",", "self", ")", ".", "focusInEvent", "(", "e", ")", "self", ".", "selectRow", "(", "self", ".", "currentIndex", "(", ")", ".", "row", "(", ")", ")" ]
Qt Override.
[ "Qt", "Override", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/preferences/languageserver.py#L507-L510
train
spyder-ide/spyder
spyder/preferences/languageserver.py
LSPServerTable.selection
def selection(self, index): """Update selected row.""" self.update() self.isActiveWindow() self._parent.delete_btn.setEnabled(True)
python
def selection(self, index): """Update selected row.""" self.update() self.isActiveWindow() self._parent.delete_btn.setEnabled(True)
[ "def", "selection", "(", "self", ",", "index", ")", ":", "self", ".", "update", "(", ")", "self", ".", "isActiveWindow", "(", ")", "self", ".", "_parent", ".", "delete_btn", ".", "setEnabled", "(", "True", ")" ]
Update selected row.
[ "Update", "selected", "row", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/preferences/languageserver.py#L512-L516
train
spyder-ide/spyder
spyder/preferences/languageserver.py
LSPServerTable.adjust_cells
def adjust_cells(self): """Adjust column size based on contents.""" self.resizeColumnsToContents() fm = self.horizontalHeader().fontMetrics() names = [fm.width(s.cmd) for s in self.source_model.servers] if names: self.setColumnWidth(CMD, max(names)) self.horiz...
python
def adjust_cells(self): """Adjust column size based on contents.""" self.resizeColumnsToContents() fm = self.horizontalHeader().fontMetrics() names = [fm.width(s.cmd) for s in self.source_model.servers] if names: self.setColumnWidth(CMD, max(names)) self.horiz...
[ "def", "adjust_cells", "(", "self", ")", ":", "self", ".", "resizeColumnsToContents", "(", ")", "fm", "=", "self", ".", "horizontalHeader", "(", ")", ".", "fontMetrics", "(", ")", "names", "=", "[", "fm", ".", "width", "(", "s", ".", "cmd", ")", "for...
Adjust column size based on contents.
[ "Adjust", "column", "size", "based", "on", "contents", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/preferences/languageserver.py#L518-L525
train
spyder-ide/spyder
spyder/preferences/languageserver.py
LSPServerTable.next_row
def next_row(self): """Move to next row from currently selected row.""" row = self.currentIndex().row() rows = self.source_model.rowCount() if row + 1 == rows: row = -1 self.selectRow(row + 1)
python
def next_row(self): """Move to next row from currently selected row.""" row = self.currentIndex().row() rows = self.source_model.rowCount() if row + 1 == rows: row = -1 self.selectRow(row + 1)
[ "def", "next_row", "(", "self", ")", ":", "row", "=", "self", ".", "currentIndex", "(", ")", ".", "row", "(", ")", "rows", "=", "self", ".", "source_model", ".", "rowCount", "(", ")", "if", "row", "+", "1", "==", "rows", ":", "row", "=", "-", "...
Move to next row from currently selected row.
[ "Move", "to", "next", "row", "from", "currently", "selected", "row", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/preferences/languageserver.py#L573-L579
train
spyder-ide/spyder
spyder/preferences/languageserver.py
LSPServerTable.previous_row
def previous_row(self): """Move to previous row from currently selected row.""" row = self.currentIndex().row() rows = self.source_model.rowCount() if row == 0: row = rows self.selectRow(row - 1)
python
def previous_row(self): """Move to previous row from currently selected row.""" row = self.currentIndex().row() rows = self.source_model.rowCount() if row == 0: row = rows self.selectRow(row - 1)
[ "def", "previous_row", "(", "self", ")", ":", "row", "=", "self", ".", "currentIndex", "(", ")", ".", "row", "(", ")", "rows", "=", "self", ".", "source_model", ".", "rowCount", "(", ")", "if", "row", "==", "0", ":", "row", "=", "rows", "self", "...
Move to previous row from currently selected row.
[ "Move", "to", "previous", "row", "from", "currently", "selected", "row", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/preferences/languageserver.py#L581-L587
train
spyder-ide/spyder
spyder/preferences/languageserver.py
LSPServerTable.keyPressEvent
def keyPressEvent(self, event): """Qt Override.""" key = event.key() if key in [Qt.Key_Enter, Qt.Key_Return]: self.show_editor() elif key in [Qt.Key_Backtab]: self.parent().reset_btn.setFocus() elif key in [Qt.Key_Up, Qt.Key_Down, Qt.Key_Left, Qt.Key_Right...
python
def keyPressEvent(self, event): """Qt Override.""" key = event.key() if key in [Qt.Key_Enter, Qt.Key_Return]: self.show_editor() elif key in [Qt.Key_Backtab]: self.parent().reset_btn.setFocus() elif key in [Qt.Key_Up, Qt.Key_Down, Qt.Key_Left, Qt.Key_Right...
[ "def", "keyPressEvent", "(", "self", ",", "event", ")", ":", "key", "=", "event", ".", "key", "(", ")", "if", "key", "in", "[", "Qt", ".", "Key_Enter", ",", "Qt", ".", "Key_Return", "]", ":", "self", ".", "show_editor", "(", ")", "elif", "key", "...
Qt Override.
[ "Qt", "Override", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/preferences/languageserver.py#L589-L601
train
spyder-ide/spyder
spyder/preferences/languageserver.py
LSPManagerConfigPage.setup_docstring_style_convention
def setup_docstring_style_convention(self, text): """Handle convention changes.""" if text == 'Custom': self.docstring_style_select.label.setText( _("Show the following errors:")) self.docstring_style_ignore.label.setText( _("Ignore the following e...
python
def setup_docstring_style_convention(self, text): """Handle convention changes.""" if text == 'Custom': self.docstring_style_select.label.setText( _("Show the following errors:")) self.docstring_style_ignore.label.setText( _("Ignore the following e...
[ "def", "setup_docstring_style_convention", "(", "self", ",", "text", ")", ":", "if", "text", "==", "'Custom'", ":", "self", ".", "docstring_style_select", ".", "label", ".", "setText", "(", "_", "(", "\"Show the following errors:\"", ")", ")", "self", ".", "do...
Handle convention changes.
[ "Handle", "convention", "changes", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/preferences/languageserver.py#L955-L968
train
spyder-ide/spyder
spyder/plugins/findinfiles/widgets.py
SearchInComboBox.add_external_path
def add_external_path(self, path): """ Adds an external path to the combobox if it exists on the file system. If the path is already listed in the combobox, it is removed from its current position and added back at the end. If the maximum number of paths is reached, the olde...
python
def add_external_path(self, path): """ Adds an external path to the combobox if it exists on the file system. If the path is already listed in the combobox, it is removed from its current position and added back at the end. If the maximum number of paths is reached, the olde...
[ "def", "add_external_path", "(", "self", ",", "path", ")", ":", "if", "not", "osp", ".", "exists", "(", "path", ")", ":", "return", "self", ".", "removeItem", "(", "self", ".", "findText", "(", "path", ")", ")", "self", ".", "addItem", "(", "path", ...
Adds an external path to the combobox if it exists on the file system. If the path is already listed in the combobox, it is removed from its current position and added back at the end. If the maximum number of paths is reached, the oldest external path is removed from the list.
[ "Adds", "an", "external", "path", "to", "the", "combobox", "if", "it", "exists", "on", "the", "file", "system", ".", "If", "the", "path", "is", "already", "listed", "in", "the", "combobox", "it", "is", "removed", "from", "its", "current", "position", "an...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/findinfiles/widgets.py#L273-L286
train
spyder-ide/spyder
spyder/plugins/findinfiles/widgets.py
SearchInComboBox.get_external_paths
def get_external_paths(self): """Returns a list of the external paths listed in the combobox.""" return [to_text_string(self.itemText(i)) for i in range(EXTERNAL_PATHS, self.count())]
python
def get_external_paths(self): """Returns a list of the external paths listed in the combobox.""" return [to_text_string(self.itemText(i)) for i in range(EXTERNAL_PATHS, self.count())]
[ "def", "get_external_paths", "(", "self", ")", ":", "return", "[", "to_text_string", "(", "self", ".", "itemText", "(", "i", ")", ")", "for", "i", "in", "range", "(", "EXTERNAL_PATHS", ",", "self", ".", "count", "(", ")", ")", "]" ]
Returns a list of the external paths listed in the combobox.
[ "Returns", "a", "list", "of", "the", "external", "paths", "listed", "in", "the", "combobox", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/findinfiles/widgets.py#L288-L291
train
spyder-ide/spyder
spyder/plugins/findinfiles/widgets.py
SearchInComboBox.get_current_searchpath
def get_current_searchpath(self): """ Returns the path corresponding to the currently selected item in the combobox. """ idx = self.currentIndex() if idx == CWD: return self.path elif idx == PROJECT: return self.project_path ...
python
def get_current_searchpath(self): """ Returns the path corresponding to the currently selected item in the combobox. """ idx = self.currentIndex() if idx == CWD: return self.path elif idx == PROJECT: return self.project_path ...
[ "def", "get_current_searchpath", "(", "self", ")", ":", "idx", "=", "self", ".", "currentIndex", "(", ")", "if", "idx", "==", "CWD", ":", "return", "self", ".", "path", "elif", "idx", "==", "PROJECT", ":", "return", "self", ".", "project_path", "elif", ...
Returns the path corresponding to the currently selected item in the combobox.
[ "Returns", "the", "path", "corresponding", "to", "the", "currently", "selected", "item", "in", "the", "combobox", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/findinfiles/widgets.py#L298-L311
train
spyder-ide/spyder
spyder/plugins/findinfiles/widgets.py
SearchInComboBox.path_selection_changed
def path_selection_changed(self): """Handles when the current index of the combobox changes.""" idx = self.currentIndex() if idx == SELECT_OTHER: external_path = self.select_directory() if len(external_path) > 0: self.add_external_path(external_path)...
python
def path_selection_changed(self): """Handles when the current index of the combobox changes.""" idx = self.currentIndex() if idx == SELECT_OTHER: external_path = self.select_directory() if len(external_path) > 0: self.add_external_path(external_path)...
[ "def", "path_selection_changed", "(", "self", ")", ":", "idx", "=", "self", ".", "currentIndex", "(", ")", "if", "idx", "==", "SELECT_OTHER", ":", "external_path", "=", "self", ".", "select_directory", "(", ")", "if", "len", "(", "external_path", ")", ">",...
Handles when the current index of the combobox changes.
[ "Handles", "when", "the", "current", "index", "of", "the", "combobox", "changes", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/findinfiles/widgets.py#L321-L340
train
spyder-ide/spyder
spyder/plugins/findinfiles/widgets.py
SearchInComboBox.select_directory
def select_directory(self): """Select directory""" self.__redirect_stdio_emit(False) directory = getexistingdirectory( self, _("Select directory"), self.path) if directory: directory = to_unicode_from_fs(osp.abspath(directory)) self.__redirect_s...
python
def select_directory(self): """Select directory""" self.__redirect_stdio_emit(False) directory = getexistingdirectory( self, _("Select directory"), self.path) if directory: directory = to_unicode_from_fs(osp.abspath(directory)) self.__redirect_s...
[ "def", "select_directory", "(", "self", ")", ":", "self", ".", "__redirect_stdio_emit", "(", "False", ")", "directory", "=", "getexistingdirectory", "(", "self", ",", "_", "(", "\"Select directory\"", ")", ",", "self", ".", "path", ")", "if", "directory", ":...
Select directory
[ "Select", "directory" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/findinfiles/widgets.py#L343-L351
train
spyder-ide/spyder
spyder/plugins/findinfiles/widgets.py
SearchInComboBox.set_project_path
def set_project_path(self, path): """ Sets the project path and disables the project search in the combobox if the value of path is None. """ if path is None: self.project_path = None self.model().item(PROJECT, 0).setEnabled(False) if s...
python
def set_project_path(self, path): """ Sets the project path and disables the project search in the combobox if the value of path is None. """ if path is None: self.project_path = None self.model().item(PROJECT, 0).setEnabled(False) if s...
[ "def", "set_project_path", "(", "self", ",", "path", ")", ":", "if", "path", "is", "None", ":", "self", ".", "project_path", "=", "None", "self", ".", "model", "(", ")", ".", "item", "(", "PROJECT", ",", "0", ")", ".", "setEnabled", "(", "False", "...
Sets the project path and disables the project search in the combobox if the value of path is None.
[ "Sets", "the", "project", "path", "and", "disables", "the", "project", "search", "in", "the", "combobox", "if", "the", "value", "of", "path", "is", "None", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/findinfiles/widgets.py#L353-L366
train
spyder-ide/spyder
spyder/plugins/findinfiles/widgets.py
SearchInComboBox.eventFilter
def eventFilter(self, widget, event): """Used to handle key events on the QListView of the combobox.""" if event.type() == QEvent.KeyPress and event.key() == Qt.Key_Delete: index = self.view().currentIndex().row() if index >= EXTERNAL_PATHS: # Remove item and...
python
def eventFilter(self, widget, event): """Used to handle key events on the QListView of the combobox.""" if event.type() == QEvent.KeyPress and event.key() == Qt.Key_Delete: index = self.view().currentIndex().row() if index >= EXTERNAL_PATHS: # Remove item and...
[ "def", "eventFilter", "(", "self", ",", "widget", ",", "event", ")", ":", "if", "event", ".", "type", "(", ")", "==", "QEvent", ".", "KeyPress", "and", "event", ".", "key", "(", ")", "==", "Qt", ".", "Key_Delete", ":", "index", "=", "self", ".", ...
Used to handle key events on the QListView of the combobox.
[ "Used", "to", "handle", "key", "events", "on", "the", "QListView", "of", "the", "combobox", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/findinfiles/widgets.py#L368-L382
train
spyder-ide/spyder
spyder/plugins/findinfiles/widgets.py
SearchInComboBox.__redirect_stdio_emit
def __redirect_stdio_emit(self, value): """ Searches through the parent tree to see if it is possible to emit the redirect_stdio signal. This logic allows to test the SearchInComboBox select_directory method outside of the FindInFiles plugin. """ parent = s...
python
def __redirect_stdio_emit(self, value): """ Searches through the parent tree to see if it is possible to emit the redirect_stdio signal. This logic allows to test the SearchInComboBox select_directory method outside of the FindInFiles plugin. """ parent = s...
[ "def", "__redirect_stdio_emit", "(", "self", ",", "value", ")", ":", "parent", "=", "self", ".", "parent", "(", ")", "while", "parent", "is", "not", "None", ":", "try", ":", "parent", ".", "redirect_stdio", ".", "emit", "(", "value", ")", "except", "At...
Searches through the parent tree to see if it is possible to emit the redirect_stdio signal. This logic allows to test the SearchInComboBox select_directory method outside of the FindInFiles plugin.
[ "Searches", "through", "the", "parent", "tree", "to", "see", "if", "it", "is", "possible", "to", "emit", "the", "redirect_stdio", "signal", ".", "This", "logic", "allows", "to", "test", "the", "SearchInComboBox", "select_directory", "method", "outside", "of", ...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/findinfiles/widgets.py#L384-L398
train
spyder-ide/spyder
spyder/plugins/findinfiles/widgets.py
FindOptions.get_options
def get_options(self, to_save=False): """Get options""" text_re = self.edit_regexp.isChecked() exclude_re = self.exclude_regexp.isChecked() case_sensitive = self.case_button.isChecked() # Return current options for them to be saved when closing # Spyder. ...
python
def get_options(self, to_save=False): """Get options""" text_re = self.edit_regexp.isChecked() exclude_re = self.exclude_regexp.isChecked() case_sensitive = self.case_button.isChecked() # Return current options for them to be saved when closing # Spyder. ...
[ "def", "get_options", "(", "self", ",", "to_save", "=", "False", ")", ":", "text_re", "=", "self", ".", "edit_regexp", ".", "isChecked", "(", ")", "exclude_re", "=", "self", ".", "exclude_regexp", ".", "isChecked", "(", ")", "case_sensitive", "=", "self", ...
Get options
[ "Get", "options" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/findinfiles/widgets.py#L532-L610
train
spyder-ide/spyder
spyder/plugins/findinfiles/widgets.py
FindOptions.keyPressEvent
def keyPressEvent(self, event): """Reimplemented to handle key events""" ctrl = event.modifiers() & Qt.ControlModifier shift = event.modifiers() & Qt.ShiftModifier if event.key() in (Qt.Key_Enter, Qt.Key_Return): self.find.emit() elif event.key() == Qt.Key_F and...
python
def keyPressEvent(self, event): """Reimplemented to handle key events""" ctrl = event.modifiers() & Qt.ControlModifier shift = event.modifiers() & Qt.ShiftModifier if event.key() in (Qt.Key_Enter, Qt.Key_Return): self.find.emit() elif event.key() == Qt.Key_F and...
[ "def", "keyPressEvent", "(", "self", ",", "event", ")", ":", "ctrl", "=", "event", ".", "modifiers", "(", ")", "&", "Qt", ".", "ControlModifier", "shift", "=", "event", ".", "modifiers", "(", ")", "&", "Qt", ".", "ShiftModifier", "if", "event", ".", ...
Reimplemented to handle key events
[ "Reimplemented", "to", "handle", "key", "events" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/findinfiles/widgets.py#L636-L646
train
spyder-ide/spyder
spyder/plugins/findinfiles/widgets.py
ResultsBrowser.activated
def activated(self, item): """Double-click event""" itemdata = self.data.get(id(self.currentItem())) if itemdata is not None: filename, lineno, colno = itemdata self.sig_edit_goto.emit(filename, lineno, self.search_text)
python
def activated(self, item): """Double-click event""" itemdata = self.data.get(id(self.currentItem())) if itemdata is not None: filename, lineno, colno = itemdata self.sig_edit_goto.emit(filename, lineno, self.search_text)
[ "def", "activated", "(", "self", ",", "item", ")", ":", "itemdata", "=", "self", ".", "data", ".", "get", "(", "id", "(", "self", ".", "currentItem", "(", ")", ")", ")", "if", "itemdata", "is", "not", "None", ":", "filename", ",", "lineno", ",", ...
Double-click event
[ "Double", "-", "click", "event" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/findinfiles/widgets.py#L771-L776
train
spyder-ide/spyder
spyder/plugins/findinfiles/widgets.py
ResultsBrowser.set_sorting
def set_sorting(self, flag): """Enable result sorting after search is complete.""" self.sorting['status'] = flag self.header().setSectionsClickable(flag == ON)
python
def set_sorting(self, flag): """Enable result sorting after search is complete.""" self.sorting['status'] = flag self.header().setSectionsClickable(flag == ON)
[ "def", "set_sorting", "(", "self", ",", "flag", ")", ":", "self", ".", "sorting", "[", "'status'", "]", "=", "flag", "self", ".", "header", "(", ")", ".", "setSectionsClickable", "(", "flag", "==", "ON", ")" ]
Enable result sorting after search is complete.
[ "Enable", "result", "sorting", "after", "search", "is", "complete", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/findinfiles/widgets.py#L778-L781
train