partition
stringclasses
3 values
func_name
stringlengths
1
134
docstring
stringlengths
1
46.9k
path
stringlengths
4
223
original_string
stringlengths
75
104k
code
stringlengths
75
104k
docstring_tokens
listlengths
1
1.97k
repo
stringlengths
7
55
language
stringclasses
1 value
url
stringlengths
87
315
code_tokens
listlengths
19
28.4k
sha
stringlengths
40
40
train
FoldScope.blocks
This generator generates the list of blocks directly under the fold region. This list does not contain blocks from child regions. :param ignore_blank_lines: True to ignore last blank lines.
spyder/plugins/editor/utils/folding.py
def blocks(self, ignore_blank_lines=True): """ This generator generates the list of blocks directly under the fold region. This list does not contain blocks from child regions. :param ignore_blank_lines: True to ignore last blank lines. """ start, end = self.get_range(ig...
def blocks(self, ignore_blank_lines=True): """ This generator generates the list of blocks directly under the fold region. This list does not contain blocks from child regions. :param ignore_blank_lines: True to ignore last blank lines. """ start, end = self.get_range(ig...
[ "This", "generator", "generates", "the", "list", "of", "blocks", "directly", "under", "the", "fold", "region", ".", "This", "list", "does", "not", "contain", "blocks", "from", "child", "regions", "." ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/utils/folding.py#L121-L132
[ "def", "blocks", "(", "self", ",", "ignore_blank_lines", "=", "True", ")", ":", "start", ",", "end", "=", "self", ".", "get_range", "(", "ignore_blank_lines", "=", "ignore_blank_lines", ")", "block", "=", "self", ".", "_trigger", ".", "next", "(", ")", "...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
FoldScope.child_regions
This generator generates the list of direct child regions.
spyder/plugins/editor/utils/folding.py
def child_regions(self): """This generator generates the list of direct child regions.""" start, end = self.get_range() block = self._trigger.next() ref_lvl = self.scope_level while block.blockNumber() <= end and block.isValid(): lvl = TextBlockHelper.get_fold_lvl(blo...
def child_regions(self): """This generator generates the list of direct child regions.""" start, end = self.get_range() block = self._trigger.next() ref_lvl = self.scope_level while block.blockNumber() <= end and block.isValid(): lvl = TextBlockHelper.get_fold_lvl(blo...
[ "This", "generator", "generates", "the", "list", "of", "direct", "child", "regions", "." ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/utils/folding.py#L134-L144
[ "def", "child_regions", "(", "self", ")", ":", "start", ",", "end", "=", "self", ".", "get_range", "(", ")", "block", "=", "self", ".", "_trigger", ".", "next", "(", ")", "ref_lvl", "=", "self", ".", "scope_level", "while", "block", ".", "blockNumber",...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
FoldScope.parent
Return the parent scope. :return: FoldScope or None
spyder/plugins/editor/utils/folding.py
def parent(self): """ Return the parent scope. :return: FoldScope or None """ if TextBlockHelper.get_fold_lvl(self._trigger) > 0 and \ self._trigger.blockNumber(): block = self._trigger.previous() ref_lvl = self.trigger_level - 1 ...
def parent(self): """ Return the parent scope. :return: FoldScope or None """ if TextBlockHelper.get_fold_lvl(self._trigger) > 0 and \ self._trigger.blockNumber(): block = self._trigger.previous() ref_lvl = self.trigger_level - 1 ...
[ "Return", "the", "parent", "scope", "." ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/utils/folding.py#L146-L164
[ "def", "parent", "(", "self", ")", ":", "if", "TextBlockHelper", ".", "get_fold_lvl", "(", "self", ".", "_trigger", ")", ">", "0", "and", "self", ".", "_trigger", ".", "blockNumber", "(", ")", ":", "block", "=", "self", ".", "_trigger", ".", "previous"...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
FoldScope.text
Get the scope text, with a possible maximum number of lines. :param max_lines: limit the number of lines returned to a maximum. :return: str
spyder/plugins/editor/utils/folding.py
def text(self, max_lines=sys.maxsize): """ Get the scope text, with a possible maximum number of lines. :param max_lines: limit the number of lines returned to a maximum. :return: str """ ret_val = [] block = self._trigger.next() _, end = self.get_range()...
def text(self, max_lines=sys.maxsize): """ Get the scope text, with a possible maximum number of lines. :param max_lines: limit the number of lines returned to a maximum. :return: str """ ret_val = [] block = self._trigger.next() _, end = self.get_range()...
[ "Get", "the", "scope", "text", "with", "a", "possible", "maximum", "number", "of", "lines", "." ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/utils/folding.py#L166-L180
[ "def", "text", "(", "self", ",", "max_lines", "=", "sys", ".", "maxsize", ")", ":", "ret_val", "=", "[", "]", "block", "=", "self", ".", "_trigger", ".", "next", "(", ")", "_", ",", "end", "=", "self", ".", "get_range", "(", ")", "while", "(", ...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
IndentFoldDetector.detect_fold_level
Detects fold level by looking at the block indentation. :param prev_block: previous text block :param block: current block to highlight
spyder/plugins/editor/utils/folding.py
def detect_fold_level(self, prev_block, block): """ Detects fold level by looking at the block indentation. :param prev_block: previous text block :param block: current block to highlight """ text = block.text() prev_lvl = TextBlockHelper().get_fold_lvl(prev_bloc...
def detect_fold_level(self, prev_block, block): """ Detects fold level by looking at the block indentation. :param prev_block: previous text block :param block: current block to highlight """ text = block.text() prev_lvl = TextBlockHelper().get_fold_lvl(prev_bloc...
[ "Detects", "fold", "level", "by", "looking", "at", "the", "block", "indentation", "." ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/utils/folding.py#L216-L236
[ "def", "detect_fold_level", "(", "self", ",", "prev_block", ",", "block", ")", ":", "text", "=", "block", ".", "text", "(", ")", "prev_lvl", "=", "TextBlockHelper", "(", ")", ".", "get_fold_lvl", "(", "prev_block", ")", "# round down to previous indentation guid...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
EditorExtensionsManager.add
Add a extension to the editor. :param extension: The extension instance to add.
spyder/plugins/editor/extensions/manager.py
def add(self, extension): """ Add a extension to the editor. :param extension: The extension instance to add. """ logger.debug('adding extension {}'.format(extension.name)) self._extensions[extension.name] = extension extension.on_install(self.editor) re...
def add(self, extension): """ Add a extension to the editor. :param extension: The extension instance to add. """ logger.debug('adding extension {}'.format(extension.name)) self._extensions[extension.name] = extension extension.on_install(self.editor) re...
[ "Add", "a", "extension", "to", "the", "editor", "." ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/extensions/manager.py#L37-L47
[ "def", "add", "(", "self", ",", "extension", ")", ":", "logger", ".", "debug", "(", "'adding extension {}'", ".", "format", "(", "extension", ".", "name", ")", ")", "self", ".", "_extensions", "[", "extension", ".", "name", "]", "=", "extension", "extens...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
EditorExtensionsManager.remove
Remove a extension from the editor. :param name_or_klass: The name (or class) of the extension to remove. :returns: The removed extension.
spyder/plugins/editor/extensions/manager.py
def remove(self, name_or_klass): """ Remove a extension from the editor. :param name_or_klass: The name (or class) of the extension to remove. :returns: The removed extension. """ logger.debug('removing extension {}'.format(name_or_klass)) extension = self.get(na...
def remove(self, name_or_klass): """ Remove a extension from the editor. :param name_or_klass: The name (or class) of the extension to remove. :returns: The removed extension. """ logger.debug('removing extension {}'.format(name_or_klass)) extension = self.get(na...
[ "Remove", "a", "extension", "from", "the", "editor", "." ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/extensions/manager.py#L49-L60
[ "def", "remove", "(", "self", ",", "name_or_klass", ")", ":", "logger", ".", "debug", "(", "'removing extension {}'", ".", "format", "(", "name_or_klass", ")", ")", "extension", "=", "self", ".", "get", "(", "name_or_klass", ")", "extension", ".", "on_uninst...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
EditorExtensionsManager.clear
Remove all extensions from the editor. All extensions are removed fromlist and deleted.
spyder/plugins/editor/extensions/manager.py
def clear(self): """ Remove all extensions from the editor. All extensions are removed fromlist and deleted. """ while len(self._extensions): key = sorted(list(self._extensions.keys()))[0] self.remove(key)
def clear(self): """ Remove all extensions from the editor. All extensions are removed fromlist and deleted. """ while len(self._extensions): key = sorted(list(self._extensions.keys()))[0] self.remove(key)
[ "Remove", "all", "extensions", "from", "the", "editor", "." ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/extensions/manager.py#L62-L70
[ "def", "clear", "(", "self", ")", ":", "while", "len", "(", "self", ".", "_extensions", ")", ":", "key", "=", "sorted", "(", "list", "(", "self", ".", "_extensions", ".", "keys", "(", ")", ")", ")", "[", "0", "]", "self", ".", "remove", "(", "k...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
EditorExtensionsManager.get
Get a extension by name (or class). :param name_or_klass: The name or the class of the extension to get :type name_or_klass: str or type :rtype: spyder.api.mode.EditorExtension
spyder/plugins/editor/extensions/manager.py
def get(self, name_or_klass): """ Get a extension by name (or class). :param name_or_klass: The name or the class of the extension to get :type name_or_klass: str or type :rtype: spyder.api.mode.EditorExtension """ if not isinstance(name_or_klass, str): ...
def get(self, name_or_klass): """ Get a extension by name (or class). :param name_or_klass: The name or the class of the extension to get :type name_or_klass: str or type :rtype: spyder.api.mode.EditorExtension """ if not isinstance(name_or_klass, str): ...
[ "Get", "a", "extension", "by", "name", "(", "or", "class", ")", "." ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/extensions/manager.py#L72-L82
[ "def", "get", "(", "self", ",", "name_or_klass", ")", ":", "if", "not", "isinstance", "(", "name_or_klass", ",", "str", ")", ":", "name_or_klass", "=", "name_or_klass", ".", "__name__", "return", "self", ".", "_extensions", "[", "name_or_klass", "]" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
insert_text_to
Helper to print text, taking into account backspaces
spyder/plugins/console/widgets/console.py
def insert_text_to(cursor, text, fmt): """Helper to print text, taking into account backspaces""" while True: index = text.find(chr(8)) # backspace if index == -1: break cursor.insertText(text[:index], fmt) if cursor.positionInBlock() > 0: cursor.deletePr...
def insert_text_to(cursor, text, fmt): """Helper to print text, taking into account backspaces""" while True: index = text.find(chr(8)) # backspace if index == -1: break cursor.insertText(text[:index], fmt) if cursor.positionInBlock() > 0: cursor.deletePr...
[ "Helper", "to", "print", "text", "taking", "into", "account", "backspaces" ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/console/widgets/console.py#L35-L45
[ "def", "insert_text_to", "(", "cursor", ",", "text", ",", "fmt", ")", ":", "while", "True", ":", "index", "=", "text", ".", "find", "(", "chr", "(", "8", ")", ")", "# backspace", "if", "index", "==", "-", "1", ":", "break", "cursor", ".", "insertTe...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
QtANSIEscapeCodeHandler.set_color_scheme
Set color scheme (foreground and background).
spyder/plugins/console/widgets/console.py
def set_color_scheme(self, foreground_color, background_color): """Set color scheme (foreground and background).""" if dark_color(foreground_color): self.default_foreground_color = 30 else: self.default_foreground_color = 37 if dark_color(background_color): ...
def set_color_scheme(self, foreground_color, background_color): """Set color scheme (foreground and background).""" if dark_color(foreground_color): self.default_foreground_color = 30 else: self.default_foreground_color = 37 if dark_color(background_color): ...
[ "Set", "color", "scheme", "(", "foreground", "and", "background", ")", "." ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/console/widgets/console.py#L54-L64
[ "def", "set_color_scheme", "(", "self", ",", "foreground_color", ",", "background_color", ")", ":", "if", "dark_color", "(", "foreground_color", ")", ":", "self", ".", "default_foreground_color", "=", "30", "else", ":", "self", ".", "default_foreground_color", "="...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
QtANSIEscapeCodeHandler.set_style
Set font style with the following attributes: 'foreground_color', 'background_color', 'italic', 'bold' and 'underline'
spyder/plugins/console/widgets/console.py
def set_style(self): """ Set font style with the following attributes: 'foreground_color', 'background_color', 'italic', 'bold' and 'underline' """ if self.current_format is None: assert self.base_format is not None self.current_format = QTextCharF...
def set_style(self): """ Set font style with the following attributes: 'foreground_color', 'background_color', 'italic', 'bold' and 'underline' """ if self.current_format is None: assert self.base_format is not None self.current_format = QTextCharF...
[ "Set", "font", "style", "with", "the", "following", "attributes", ":", "foreground_color", "background_color", "italic", "bold", "and", "underline" ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/console/widgets/console.py#L72-L115
[ "def", "set_style", "(", "self", ")", ":", "if", "self", ".", "current_format", "is", "None", ":", "assert", "self", ".", "base_format", "is", "not", "None", "self", ".", "current_format", "=", "QTextCharFormat", "(", "self", ".", "base_format", ")", "# Fo...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
ConsoleBaseWidget.set_color_scheme
Set color scheme of the console (foreground and background).
spyder/plugins/console/widgets/console.py
def set_color_scheme(self, foreground_color, background_color): """Set color scheme of the console (foreground and background).""" self.ansi_handler.set_color_scheme(foreground_color, background_color) background_color = QColor(background_color) foreground_color = QColor(foreground_colo...
def set_color_scheme(self, foreground_color, background_color): """Set color scheme of the console (foreground and background).""" self.ansi_handler.set_color_scheme(foreground_color, background_color) background_color = QColor(background_color) foreground_color = QColor(foreground_colo...
[ "Set", "color", "scheme", "of", "the", "console", "(", "foreground", "and", "background", ")", "." ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/console/widgets/console.py#L202-L212
[ "def", "set_color_scheme", "(", "self", ",", "foreground_color", ",", "background_color", ")", ":", "self", ".", "ansi_handler", ".", "set_color_scheme", "(", "foreground_color", ",", "background_color", ")", "background_color", "=", "QColor", "(", "background_color",...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
ConsoleBaseWidget.insert_text
Reimplement TextEditBaseWidget method
spyder/plugins/console/widgets/console.py
def insert_text(self, text): """Reimplement TextEditBaseWidget method""" # Eventually this maybe should wrap to insert_text_to if # backspace-handling is required self.textCursor().insertText(text, self.default_style.format)
def insert_text(self, text): """Reimplement TextEditBaseWidget method""" # Eventually this maybe should wrap to insert_text_to if # backspace-handling is required self.textCursor().insertText(text, self.default_style.format)
[ "Reimplement", "TextEditBaseWidget", "method" ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/console/widgets/console.py#L215-L219
[ "def", "insert_text", "(", "self", ",", "text", ")", ":", "# Eventually this maybe should wrap to insert_text_to if", "# backspace-handling is required", "self", ".", "textCursor", "(", ")", ".", "insertText", "(", "text", ",", "self", ".", "default_style", ".", "form...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
ConsoleBaseWidget.paste
Reimplement Qt method
spyder/plugins/console/widgets/console.py
def paste(self): """Reimplement Qt method""" if self.has_selected_text(): self.remove_selected_text() self.insert_text(QApplication.clipboard().text())
def paste(self): """Reimplement Qt method""" if self.has_selected_text(): self.remove_selected_text() self.insert_text(QApplication.clipboard().text())
[ "Reimplement", "Qt", "method" ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/console/widgets/console.py#L221-L225
[ "def", "paste", "(", "self", ")", ":", "if", "self", ".", "has_selected_text", "(", ")", ":", "self", ".", "remove_selected_text", "(", ")", "self", ".", "insert_text", "(", "QApplication", ".", "clipboard", "(", ")", ".", "text", "(", ")", ")" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
ConsoleBaseWidget.append_text_to_shell
Append text to Python shell In a way, this method overrides the method 'insert_text' when text is inserted at the end of the text widget for a Python shell Handles error messages and show blue underlined links Handles ANSI color sequences Handles ANSI FF sequence
spyder/plugins/console/widgets/console.py
def append_text_to_shell(self, text, error, prompt): """ Append text to Python shell In a way, this method overrides the method 'insert_text' when text is inserted at the end of the text widget for a Python shell Handles error messages and show blue underlined links Hand...
def append_text_to_shell(self, text, error, prompt): """ Append text to Python shell In a way, this method overrides the method 'insert_text' when text is inserted at the end of the text widget for a Python shell Handles error messages and show blue underlined links Hand...
[ "Append", "text", "to", "Python", "shell", "In", "a", "way", "this", "method", "overrides", "the", "method", "insert_text", "when", "text", "is", "inserted", "at", "the", "end", "of", "the", "text", "widget", "for", "a", "Python", "shell" ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/console/widgets/console.py#L227-L289
[ "def", "append_text_to_shell", "(", "self", ",", "text", ",", "error", ",", "prompt", ")", ":", "cursor", "=", "self", ".", "textCursor", "(", ")", "cursor", ".", "movePosition", "(", "QTextCursor", ".", "End", ")", "if", "'\\r'", "in", "text", ":", "#...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
ConsoleBaseWidget.set_pythonshell_font
Python Shell only
spyder/plugins/console/widgets/console.py
def set_pythonshell_font(self, font=None): """Python Shell only""" if font is None: font = QFont() for style in self.font_styles: style.apply_style(font=font, is_default=style is self.default_style) self.ansi_handler.set_base_format(s...
def set_pythonshell_font(self, font=None): """Python Shell only""" if font is None: font = QFont() for style in self.font_styles: style.apply_style(font=font, is_default=style is self.default_style) self.ansi_handler.set_base_format(s...
[ "Python", "Shell", "only" ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/console/widgets/console.py#L291-L298
[ "def", "set_pythonshell_font", "(", "self", ",", "font", "=", "None", ")", ":", "if", "font", "is", "None", ":", "font", "=", "QFont", "(", ")", "for", "style", "in", "self", ".", "font_styles", ":", "style", ".", "apply_style", "(", "font", "=", "fo...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
Pylint.get_plugin_icon
Return widget icon
spyder/plugins/pylint/plugin.py
def get_plugin_icon(self): """Return widget icon""" path = osp.join(self.PLUGIN_PATH, self.IMG_PATH) return ima.icon('pylint', icon_path=path)
def get_plugin_icon(self): """Return widget icon""" path = osp.join(self.PLUGIN_PATH, self.IMG_PATH) return ima.icon('pylint', icon_path=path)
[ "Return", "widget", "icon" ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/pylint/plugin.py#L75-L78
[ "def", "get_plugin_icon", "(", "self", ")", ":", "path", "=", "osp", ".", "join", "(", "self", ".", "PLUGIN_PATH", ",", "self", ".", "IMG_PATH", ")", "return", "ima", ".", "icon", "(", "'pylint'", ",", "icon_path", "=", "path", ")" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
Pylint.register_plugin
Register plugin in Spyder's main window
spyder/plugins/pylint/plugin.py
def register_plugin(self): """Register plugin in Spyder's main window""" self.pylint.treewidget.sig_edit_goto.connect(self.main.editor.load) self.pylint.redirect_stdio.connect( self.main.redirect_internalshell_stdio) self.main.add_dockwidget(self) pyli...
def register_plugin(self): """Register plugin in Spyder's main window""" self.pylint.treewidget.sig_edit_goto.connect(self.main.editor.load) self.pylint.redirect_stdio.connect( self.main.redirect_internalshell_stdio) self.main.add_dockwidget(self) pyli...
[ "Register", "plugin", "in", "Spyder", "s", "main", "window" ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/pylint/plugin.py#L96-L110
[ "def", "register_plugin", "(", "self", ")", ":", "self", ".", "pylint", ".", "treewidget", ".", "sig_edit_goto", ".", "connect", "(", "self", ".", "main", ".", "editor", ".", "load", ")", "self", ".", "pylint", ".", "redirect_stdio", ".", "connect", "(",...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
Pylint.run_pylint
Run pylint code analysis
spyder/plugins/pylint/plugin.py
def run_pylint(self): """Run pylint code analysis""" if (self.get_option('save_before', True) and not self.main.editor.save()): return self.switch_to_plugin() self.analyze(self.main.editor.get_current_filename())
def run_pylint(self): """Run pylint code analysis""" if (self.get_option('save_before', True) and not self.main.editor.save()): return self.switch_to_plugin() self.analyze(self.main.editor.get_current_filename())
[ "Run", "pylint", "code", "analysis" ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/pylint/plugin.py#L138-L144
[ "def", "run_pylint", "(", "self", ")", ":", "if", "(", "self", ".", "get_option", "(", "'save_before'", ",", "True", ")", "and", "not", "self", ".", "main", ".", "editor", ".", "save", "(", ")", ")", ":", "return", "self", ".", "switch_to_plugin", "(...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
Pylint.analyze
Reimplement analyze method
spyder/plugins/pylint/plugin.py
def analyze(self, filename): """Reimplement analyze method""" if self.dockwidget and not self.ismaximized: self.dockwidget.setVisible(True) self.dockwidget.setFocus() self.dockwidget.raise_() self.pylint.analyze(filename)
def analyze(self, filename): """Reimplement analyze method""" if self.dockwidget and not self.ismaximized: self.dockwidget.setVisible(True) self.dockwidget.setFocus() self.dockwidget.raise_() self.pylint.analyze(filename)
[ "Reimplement", "analyze", "method" ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/pylint/plugin.py#L146-L152
[ "def", "analyze", "(", "self", ",", "filename", ")", ":", "if", "self", ".", "dockwidget", "and", "not", "self", ".", "ismaximized", ":", "self", ".", "dockwidget", ".", "setVisible", "(", "True", ")", "self", ".", "dockwidget", ".", "setFocus", "(", "...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
AppearanceConfigPage.set_font
Set global font used in Spyder.
spyder/preferences/appearance.py
def set_font(self, font, option): """Set global font used in Spyder.""" # Update fonts in all plugins set_font(font, option=option) plugins = self.main.widgetlist + self.main.thirdparty_plugins for plugin in plugins: plugin.update_font()
def set_font(self, font, option): """Set global font used in Spyder.""" # Update fonts in all plugins set_font(font, option=option) plugins = self.main.widgetlist + self.main.thirdparty_plugins for plugin in plugins: plugin.update_font()
[ "Set", "global", "font", "used", "in", "Spyder", "." ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/preferences/appearance.py#L182-L188
[ "def", "set_font", "(", "self", ",", "font", ",", "option", ")", ":", "# Update fonts in all plugins", "set_font", "(", "font", ",", "option", "=", "option", ")", "plugins", "=", "self", ".", "main", ".", "widgetlist", "+", "self", ".", "main", ".", "thi...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
AppearanceConfigPage.update_qt_style_combobox
Enable/disable the Qt style combobox.
spyder/preferences/appearance.py
def update_qt_style_combobox(self): """Enable/disable the Qt style combobox.""" if is_dark_interface(): self.style_combobox.setEnabled(False) else: self.style_combobox.setEnabled(True)
def update_qt_style_combobox(self): """Enable/disable the Qt style combobox.""" if is_dark_interface(): self.style_combobox.setEnabled(False) else: self.style_combobox.setEnabled(True)
[ "Enable", "/", "disable", "the", "Qt", "style", "combobox", "." ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/preferences/appearance.py#L248-L253
[ "def", "update_qt_style_combobox", "(", "self", ")", ":", "if", "is_dark_interface", "(", ")", ":", "self", ".", "style_combobox", ".", "setEnabled", "(", "False", ")", "else", ":", "self", ".", "style_combobox", ".", "setEnabled", "(", "True", ")" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
AppearanceConfigPage.update_combobox
Recreates the combobox contents.
spyder/preferences/appearance.py
def update_combobox(self): """Recreates the combobox contents.""" index = self.current_scheme_index self.schemes_combobox.blockSignals(True) names = self.get_option("names") try: names.pop(names.index(u'Custom')) except ValueError: pass cus...
def update_combobox(self): """Recreates the combobox contents.""" index = self.current_scheme_index self.schemes_combobox.blockSignals(True) names = self.get_option("names") try: names.pop(names.index(u'Custom')) except ValueError: pass cus...
[ "Recreates", "the", "combobox", "contents", "." ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/preferences/appearance.py#L255-L287
[ "def", "update_combobox", "(", "self", ")", ":", "index", "=", "self", ".", "current_scheme_index", "self", ".", "schemes_combobox", ".", "blockSignals", "(", "True", ")", "names", "=", "self", ".", "get_option", "(", "\"names\"", ")", "try", ":", "names", ...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
AppearanceConfigPage.update_buttons
Updates the enable status of delete and reset buttons.
spyder/preferences/appearance.py
def update_buttons(self): """Updates the enable status of delete and reset buttons.""" current_scheme = self.current_scheme names = self.get_option("names") try: names.pop(names.index(u'Custom')) except ValueError: pass delete_enabled = current_sch...
def update_buttons(self): """Updates the enable status of delete and reset buttons.""" current_scheme = self.current_scheme names = self.get_option("names") try: names.pop(names.index(u'Custom')) except ValueError: pass delete_enabled = current_sch...
[ "Updates", "the", "enable", "status", "of", "delete", "and", "reset", "buttons", "." ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/preferences/appearance.py#L289-L299
[ "def", "update_buttons", "(", "self", ")", ":", "current_scheme", "=", "self", ".", "current_scheme", "names", "=", "self", ".", "get_option", "(", "\"names\"", ")", "try", ":", "names", ".", "pop", "(", "names", ".", "index", "(", "u'Custom'", ")", ")",...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
AppearanceConfigPage.update_preview
Update the color scheme of the preview editor and adds text. Note ---- 'index' is needed, because this is triggered by a signal that sends the selected index.
spyder/preferences/appearance.py
def update_preview(self, index=None, scheme_name=None): """ Update the color scheme of the preview editor and adds text. Note ---- 'index' is needed, because this is triggered by a signal that sends the selected index. """ text = ('"""A string"""\n\n' ...
def update_preview(self, index=None, scheme_name=None): """ Update the color scheme of the preview editor and adds text. Note ---- 'index' is needed, because this is triggered by a signal that sends the selected index. """ text = ('"""A string"""\n\n' ...
[ "Update", "the", "color", "scheme", "of", "the", "preview", "editor", "and", "adds", "text", "." ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/preferences/appearance.py#L301-L330
[ "def", "update_preview", "(", "self", ",", "index", "=", "None", ",", "scheme_name", "=", "None", ")", ":", "text", "=", "(", "'\"\"\"A string\"\"\"\\n\\n'", "'# A comment\\n\\n'", "'# %% A cell\\n\\n'", "'class Foo(object):\\n'", "' def __init__(self):\\n'", "' ...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
AppearanceConfigPage.create_new_scheme
Creates a new color scheme with a custom name.
spyder/preferences/appearance.py
def create_new_scheme(self): """Creates a new color scheme with a custom name.""" names = self.get_option('names') custom_names = self.get_option('custom_names', []) # Get the available number this new color scheme counter = len(custom_names) - 1 custom_index = [int(n.sp...
def create_new_scheme(self): """Creates a new color scheme with a custom name.""" names = self.get_option('names') custom_names = self.get_option('custom_names', []) # Get the available number this new color scheme counter = len(custom_names) - 1 custom_index = [int(n.sp...
[ "Creates", "a", "new", "color", "scheme", "with", "a", "custom", "name", "." ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/preferences/appearance.py#L334-L377
[ "def", "create_new_scheme", "(", "self", ")", ":", "names", "=", "self", ".", "get_option", "(", "'names'", ")", "custom_names", "=", "self", ".", "get_option", "(", "'custom_names'", ",", "[", "]", ")", "# Get the available number this new color scheme", "counter...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
AppearanceConfigPage.edit_scheme
Edit current scheme.
spyder/preferences/appearance.py
def edit_scheme(self): """Edit current scheme.""" dlg = self.scheme_editor_dialog dlg.set_scheme(self.current_scheme) if dlg.exec_(): # Update temp scheme to reflect instant edits on the preview temporal_color_scheme = dlg.get_edited_color_scheme() fo...
def edit_scheme(self): """Edit current scheme.""" dlg = self.scheme_editor_dialog dlg.set_scheme(self.current_scheme) if dlg.exec_(): # Update temp scheme to reflect instant edits on the preview temporal_color_scheme = dlg.get_edited_color_scheme() fo...
[ "Edit", "current", "scheme", "." ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/preferences/appearance.py#L379-L391
[ "def", "edit_scheme", "(", "self", ")", ":", "dlg", "=", "self", ".", "scheme_editor_dialog", "dlg", ".", "set_scheme", "(", "self", ".", "current_scheme", ")", "if", "dlg", ".", "exec_", "(", ")", ":", "# Update temp scheme to reflect instant edits on the preview...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
AppearanceConfigPage.delete_scheme
Deletes the currently selected custom color scheme.
spyder/preferences/appearance.py
def delete_scheme(self): """Deletes the currently selected custom color scheme.""" scheme_name = self.current_scheme answer = QMessageBox.warning(self, _("Warning"), _("Are you sure you want to delete " "this scheme?"),...
def delete_scheme(self): """Deletes the currently selected custom color scheme.""" scheme_name = self.current_scheme answer = QMessageBox.warning(self, _("Warning"), _("Are you sure you want to delete " "this scheme?"),...
[ "Deletes", "the", "currently", "selected", "custom", "color", "scheme", "." ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/preferences/appearance.py#L393-L422
[ "def", "delete_scheme", "(", "self", ")", ":", "scheme_name", "=", "self", ".", "current_scheme", "answer", "=", "QMessageBox", ".", "warning", "(", "self", ",", "_", "(", "\"Warning\"", ")", ",", "_", "(", "\"Are you sure you want to delete \"", "\"this scheme?...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
AppearanceConfigPage.reset_to_default
Restore initial values for default color schemes.
spyder/preferences/appearance.py
def reset_to_default(self): """Restore initial values for default color schemes.""" # Checks that this is indeed a default scheme scheme = self.current_scheme names = self.get_option('names') if scheme in names: for key in syntaxhighlighters.COLOR_SCHEME_KEYS: ...
def reset_to_default(self): """Restore initial values for default color schemes.""" # Checks that this is indeed a default scheme scheme = self.current_scheme names = self.get_option('names') if scheme in names: for key in syntaxhighlighters.COLOR_SCHEME_KEYS: ...
[ "Restore", "initial", "values", "for", "default", "color", "schemes", "." ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/preferences/appearance.py#L432-L443
[ "def", "reset_to_default", "(", "self", ")", ":", "# Checks that this is indeed a default scheme", "scheme", "=", "self", ".", "current_scheme", "names", "=", "self", ".", "get_option", "(", "'names'", ")", "if", "scheme", "in", "names", ":", "for", "key", "in",...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
SchemeEditor.set_scheme
Set the current stack by 'scheme_name'.
spyder/preferences/appearance.py
def set_scheme(self, scheme_name): """Set the current stack by 'scheme_name'.""" self.stack.setCurrentIndex(self.order.index(scheme_name)) self.last_used_scheme = scheme_name
def set_scheme(self, scheme_name): """Set the current stack by 'scheme_name'.""" self.stack.setCurrentIndex(self.order.index(scheme_name)) self.last_used_scheme = scheme_name
[ "Set", "the", "current", "stack", "by", "scheme_name", "." ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/preferences/appearance.py#L476-L479
[ "def", "set_scheme", "(", "self", ",", "scheme_name", ")", ":", "self", ".", "stack", ".", "setCurrentIndex", "(", "self", ".", "order", ".", "index", "(", "scheme_name", ")", ")", "self", ".", "last_used_scheme", "=", "scheme_name" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
SchemeEditor.get_edited_color_scheme
Get the values of the last edited color scheme to be used in an instant preview in the preview editor, without using `apply`.
spyder/preferences/appearance.py
def get_edited_color_scheme(self): """ Get the values of the last edited color scheme to be used in an instant preview in the preview editor, without using `apply`. """ color_scheme = {} scheme_name = self.last_used_scheme for key in self.widgets[scheme_name]: ...
def get_edited_color_scheme(self): """ Get the values of the last edited color scheme to be used in an instant preview in the preview editor, without using `apply`. """ color_scheme = {} scheme_name = self.last_used_scheme for key in self.widgets[scheme_name]: ...
[ "Get", "the", "values", "of", "the", "last", "edited", "color", "scheme", "to", "be", "used", "in", "an", "instant", "preview", "in", "the", "preview", "editor", "without", "using", "apply", "." ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/preferences/appearance.py#L488-L509
[ "def", "get_edited_color_scheme", "(", "self", ")", ":", "color_scheme", "=", "{", "}", "scheme_name", "=", "self", ".", "last_used_scheme", "for", "key", "in", "self", ".", "widgets", "[", "scheme_name", "]", ":", "items", "=", "self", ".", "widgets", "["...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
SchemeEditor.add_color_scheme_stack
Add a stack for a given scheme and connects the CONF values.
spyder/preferences/appearance.py
def add_color_scheme_stack(self, scheme_name, custom=False): """Add a stack for a given scheme and connects the CONF values.""" color_scheme_groups = [ (_('Text'), ["normal", "comment", "string", "number", "keyword", "builtin", "definition", "instance", ]), ...
def add_color_scheme_stack(self, scheme_name, custom=False): """Add a stack for a given scheme and connects the CONF values.""" color_scheme_groups = [ (_('Text'), ["normal", "comment", "string", "number", "keyword", "builtin", "definition", "instance", ]), ...
[ "Add", "a", "stack", "for", "a", "given", "scheme", "and", "connects", "the", "CONF", "values", "." ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/preferences/appearance.py#L513-L601
[ "def", "add_color_scheme_stack", "(", "self", ",", "scheme_name", ",", "custom", "=", "False", ")", ":", "color_scheme_groups", "=", "[", "(", "_", "(", "'Text'", ")", ",", "[", "\"normal\"", ",", "\"comment\"", ",", "\"string\"", ",", "\"number\"", ",", "...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
SchemeEditor.delete_color_scheme_stack
Remove stack widget by 'scheme_name'.
spyder/preferences/appearance.py
def delete_color_scheme_stack(self, scheme_name): """Remove stack widget by 'scheme_name'.""" self.set_scheme(scheme_name) widget = self.stack.currentWidget() self.stack.removeWidget(widget) index = self.order.index(scheme_name) self.order.pop(index)
def delete_color_scheme_stack(self, scheme_name): """Remove stack widget by 'scheme_name'.""" self.set_scheme(scheme_name) widget = self.stack.currentWidget() self.stack.removeWidget(widget) index = self.order.index(scheme_name) self.order.pop(index)
[ "Remove", "stack", "widget", "by", "scheme_name", "." ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/preferences/appearance.py#L603-L609
[ "def", "delete_color_scheme_stack", "(", "self", ",", "scheme_name", ")", ":", "self", ".", "set_scheme", "(", "scheme_name", ")", "widget", "=", "self", ".", "stack", ".", "currentWidget", "(", ")", "self", ".", "stack", ".", "removeWidget", "(", "widget", ...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
Projects.get_plugin_actions
Return a list of actions related to plugin
spyder/plugins/projects/plugin.py
def get_plugin_actions(self): """Return a list of actions related to plugin""" self.new_project_action = create_action(self, _("New Project..."), triggered=self.create_new_project) self.open_project_action = create_acti...
def get_plugin_actions(self): """Return a list of actions related to plugin""" self.new_project_action = create_action(self, _("New Project..."), triggered=self.create_new_project) self.open_project_action = create_acti...
[ "Return", "a", "list", "of", "actions", "related", "to", "plugin" ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/projects/plugin.py#L80-L113
[ "def", "get_plugin_actions", "(", "self", ")", ":", "self", ".", "new_project_action", "=", "create_action", "(", "self", ",", "_", "(", "\"New Project...\"", ")", ",", "triggered", "=", "self", ".", "create_new_project", ")", "self", ".", "open_project_action",...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
Projects.register_plugin
Register plugin in Spyder's main window
spyder/plugins/projects/plugin.py
def register_plugin(self): """Register plugin in Spyder's main window""" ipyconsole = self.main.ipyconsole treewidget = self.explorer.treewidget lspmgr = self.main.lspmanager self.main.add_dockwidget(self) self.explorer.sig_open_file.connect(self.main.open_file) ...
def register_plugin(self): """Register plugin in Spyder's main window""" ipyconsole = self.main.ipyconsole treewidget = self.explorer.treewidget lspmgr = self.main.lspmanager self.main.add_dockwidget(self) self.explorer.sig_open_file.connect(self.main.open_file) ...
[ "Register", "plugin", "in", "Spyder", "s", "main", "window" ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/projects/plugin.py#L115-L166
[ "def", "register_plugin", "(", "self", ")", ":", "ipyconsole", "=", "self", ".", "main", ".", "ipyconsole", "treewidget", "=", "self", ".", "explorer", ".", "treewidget", "lspmgr", "=", "self", ".", "main", ".", "lspmanager", "self", ".", "main", ".", "a...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
Projects.closing_plugin
Perform actions before parent main window is closed
spyder/plugins/projects/plugin.py
def closing_plugin(self, cancelable=False): """Perform actions before parent main window is closed""" self.save_config() self.explorer.closing_widget() return True
def closing_plugin(self, cancelable=False): """Perform actions before parent main window is closed""" self.save_config() self.explorer.closing_widget() return True
[ "Perform", "actions", "before", "parent", "main", "window", "is", "closed" ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/projects/plugin.py#L172-L176
[ "def", "closing_plugin", "(", "self", ",", "cancelable", "=", "False", ")", ":", "self", ".", "save_config", "(", ")", "self", ".", "explorer", ".", "closing_widget", "(", ")", "return", "True" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
Projects.switch_to_plugin
Switch to plugin.
spyder/plugins/projects/plugin.py
def switch_to_plugin(self): """Switch to plugin.""" # Unmaxizime currently maximized plugin if (self.main.last_plugin is not None and self.main.last_plugin.ismaximized and self.main.last_plugin is not self): self.main.maximize_dockwidget() ...
def switch_to_plugin(self): """Switch to plugin.""" # Unmaxizime currently maximized plugin if (self.main.last_plugin is not None and self.main.last_plugin.ismaximized and self.main.last_plugin is not self): self.main.maximize_dockwidget() ...
[ "Switch", "to", "plugin", "." ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/projects/plugin.py#L178-L190
[ "def", "switch_to_plugin", "(", "self", ")", ":", "# Unmaxizime currently maximized plugin\r", "if", "(", "self", ".", "main", ".", "last_plugin", "is", "not", "None", "and", "self", ".", "main", ".", "last_plugin", ".", "ismaximized", "and", "self", ".", "mai...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
Projects.setup_menu_actions
Setup and update the menu actions.
spyder/plugins/projects/plugin.py
def setup_menu_actions(self): """Setup and update the menu actions.""" self.recent_project_menu.clear() self.recent_projects_actions = [] if self.recent_projects: for project in self.recent_projects: if self.is_valid_project(project): ...
def setup_menu_actions(self): """Setup and update the menu actions.""" self.recent_project_menu.clear() self.recent_projects_actions = [] if self.recent_projects: for project in self.recent_projects: if self.is_valid_project(project): ...
[ "Setup", "and", "update", "the", "menu", "actions", "." ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/projects/plugin.py#L193-L216
[ "def", "setup_menu_actions", "(", "self", ")", ":", "self", ".", "recent_project_menu", ".", "clear", "(", ")", "self", ".", "recent_projects_actions", "=", "[", "]", "if", "self", ".", "recent_projects", ":", "for", "project", "in", "self", ".", "recent_pro...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
Projects.update_project_actions
Update actions of the Projects menu
spyder/plugins/projects/plugin.py
def update_project_actions(self): """Update actions of the Projects menu""" if self.recent_projects: self.clear_recent_projects_action.setEnabled(True) else: self.clear_recent_projects_action.setEnabled(False) active = bool(self.get_active_project_path()) ...
def update_project_actions(self): """Update actions of the Projects menu""" if self.recent_projects: self.clear_recent_projects_action.setEnabled(True) else: self.clear_recent_projects_action.setEnabled(False) active = bool(self.get_active_project_path()) ...
[ "Update", "actions", "of", "the", "Projects", "menu" ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/projects/plugin.py#L218-L228
[ "def", "update_project_actions", "(", "self", ")", ":", "if", "self", ".", "recent_projects", ":", "self", ".", "clear_recent_projects_action", ".", "setEnabled", "(", "True", ")", "else", ":", "self", ".", "clear_recent_projects_action", ".", "setEnabled", "(", ...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
Projects.edit_project_preferences
Edit Spyder active project preferences
spyder/plugins/projects/plugin.py
def edit_project_preferences(self): """Edit Spyder active project preferences""" from spyder.plugins.projects.confpage import ProjectPreferences if self.project_active: active_project = self.project_list[0] dlg = ProjectPreferences(self, active_project) # ...
def edit_project_preferences(self): """Edit Spyder active project preferences""" from spyder.plugins.projects.confpage import ProjectPreferences if self.project_active: active_project = self.project_list[0] dlg = ProjectPreferences(self, active_project) # ...
[ "Edit", "Spyder", "active", "project", "preferences" ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/projects/plugin.py#L230-L242
[ "def", "edit_project_preferences", "(", "self", ")", ":", "from", "spyder", ".", "plugins", ".", "projects", ".", "confpage", "import", "ProjectPreferences", "if", "self", ".", "project_active", ":", "active_project", "=", "self", ".", "project_list", "[", "0", ...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
Projects.create_new_project
Create new project
spyder/plugins/projects/plugin.py
def create_new_project(self): """Create new project""" self.switch_to_plugin() active_project = self.current_active_project dlg = ProjectDialog(self) dlg.sig_project_creation_requested.connect(self._create_project) dlg.sig_project_creation_requested.connect(self.sig...
def create_new_project(self): """Create new project""" self.switch_to_plugin() active_project = self.current_active_project dlg = ProjectDialog(self) dlg.sig_project_creation_requested.connect(self._create_project) dlg.sig_project_creation_requested.connect(self.sig...
[ "Create", "new", "project" ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/projects/plugin.py#L245-L257
[ "def", "create_new_project", "(", "self", ")", ":", "self", ".", "switch_to_plugin", "(", ")", "active_project", "=", "self", ".", "current_active_project", "dlg", "=", "ProjectDialog", "(", "self", ")", "dlg", ".", "sig_project_creation_requested", ".", "connect"...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
Projects._create_project
Create a new project.
spyder/plugins/projects/plugin.py
def _create_project(self, path): """Create a new project.""" self.open_project(path=path) self.setup_menu_actions() self.add_to_recent(path)
def _create_project(self, path): """Create a new project.""" self.open_project(path=path) self.setup_menu_actions() self.add_to_recent(path)
[ "Create", "a", "new", "project", "." ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/projects/plugin.py#L259-L263
[ "def", "_create_project", "(", "self", ",", "path", ")", ":", "self", ".", "open_project", "(", "path", "=", "path", ")", "self", ".", "setup_menu_actions", "(", ")", "self", ".", "add_to_recent", "(", "path", ")" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
Projects.open_project
Open the project located in `path`
spyder/plugins/projects/plugin.py
def open_project(self, path=None, restart_consoles=True, save_previous_files=True): """Open the project located in `path`""" self.switch_to_plugin() if path is None: basedir = get_home_dir() path = getexistingdirectory(parent=self, ...
def open_project(self, path=None, restart_consoles=True, save_previous_files=True): """Open the project located in `path`""" self.switch_to_plugin() if path is None: basedir = get_home_dir() path = getexistingdirectory(parent=self, ...
[ "Open", "the", "project", "located", "in", "path" ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/projects/plugin.py#L265-L309
[ "def", "open_project", "(", "self", ",", "path", "=", "None", ",", "restart_consoles", "=", "True", ",", "save_previous_files", "=", "True", ")", ":", "self", ".", "switch_to_plugin", "(", ")", "if", "path", "is", "None", ":", "basedir", "=", "get_home_dir...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
Projects.close_project
Close current project and return to a window without an active project
spyder/plugins/projects/plugin.py
def close_project(self): """ Close current project and return to a window without an active project """ if self.current_active_project: self.switch_to_plugin() if self.main.editor is not None: self.set_project_filenames( ...
def close_project(self): """ Close current project and return to a window without an active project """ if self.current_active_project: self.switch_to_plugin() if self.main.editor is not None: self.set_project_filenames( ...
[ "Close", "current", "project", "and", "return", "to", "a", "window", "without", "an", "active", "project" ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/projects/plugin.py#L311-L335
[ "def", "close_project", "(", "self", ")", ":", "if", "self", ".", "current_active_project", ":", "self", ".", "switch_to_plugin", "(", ")", "if", "self", ".", "main", ".", "editor", "is", "not", "None", ":", "self", ".", "set_project_filenames", "(", "self...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
Projects.delete_project
Delete the current project without deleting the files in the directory.
spyder/plugins/projects/plugin.py
def delete_project(self): """ Delete the current project without deleting the files in the directory. """ if self.current_active_project: self.switch_to_plugin() path = self.current_active_project.root_path buttons = QMessageBox.Yes | QMessageBo...
def delete_project(self): """ Delete the current project without deleting the files in the directory. """ if self.current_active_project: self.switch_to_plugin() path = self.current_active_project.root_path buttons = QMessageBox.Yes | QMessageBo...
[ "Delete", "the", "current", "project", "without", "deleting", "the", "files", "in", "the", "directory", "." ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/projects/plugin.py#L337-L363
[ "def", "delete_project", "(", "self", ")", ":", "if", "self", ".", "current_active_project", ":", "self", ".", "switch_to_plugin", "(", ")", "path", "=", "self", ".", "current_active_project", ".", "root_path", "buttons", "=", "QMessageBox", ".", "Yes", "|", ...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
Projects.reopen_last_project
Reopen the active project when Spyder was closed last time, if any
spyder/plugins/projects/plugin.py
def reopen_last_project(self): """ Reopen the active project when Spyder was closed last time, if any """ current_project_path = self.get_option('current_project_path', default=None) # Needs a safer test of project existence!...
def reopen_last_project(self): """ Reopen the active project when Spyder was closed last time, if any """ current_project_path = self.get_option('current_project_path', default=None) # Needs a safer test of project existence!...
[ "Reopen", "the", "active", "project", "when", "Spyder", "was", "closed", "last", "time", "if", "any" ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/projects/plugin.py#L374-L387
[ "def", "reopen_last_project", "(", "self", ")", ":", "current_project_path", "=", "self", ".", "get_option", "(", "'current_project_path'", ",", "default", "=", "None", ")", "# Needs a safer test of project existence!\r", "if", "current_project_path", "and", "self", "."...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
Projects.get_project_filenames
Get the list of recent filenames of a project
spyder/plugins/projects/plugin.py
def get_project_filenames(self): """Get the list of recent filenames of a project""" recent_files = [] if self.current_active_project: recent_files = self.current_active_project.get_recent_files() elif self.latest_project: recent_files = self.latest_project....
def get_project_filenames(self): """Get the list of recent filenames of a project""" recent_files = [] if self.current_active_project: recent_files = self.current_active_project.get_recent_files() elif self.latest_project: recent_files = self.latest_project....
[ "Get", "the", "list", "of", "recent", "filenames", "of", "a", "project" ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/projects/plugin.py#L389-L396
[ "def", "get_project_filenames", "(", "self", ")", ":", "recent_files", "=", "[", "]", "if", "self", ".", "current_active_project", ":", "recent_files", "=", "self", ".", "current_active_project", ".", "get_recent_files", "(", ")", "elif", "self", ".", "latest_pr...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
Projects.set_project_filenames
Set the list of open file names in a project
spyder/plugins/projects/plugin.py
def set_project_filenames(self, recent_files): """Set the list of open file names in a project""" if (self.current_active_project and self.is_valid_project( self.current_active_project.root_path)): self.current_active_project.set_recent_files(rece...
def set_project_filenames(self, recent_files): """Set the list of open file names in a project""" if (self.current_active_project and self.is_valid_project( self.current_active_project.root_path)): self.current_active_project.set_recent_files(rece...
[ "Set", "the", "list", "of", "open", "file", "names", "in", "a", "project" ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/projects/plugin.py#L398-L403
[ "def", "set_project_filenames", "(", "self", ",", "recent_files", ")", ":", "if", "(", "self", ".", "current_active_project", "and", "self", ".", "is_valid_project", "(", "self", ".", "current_active_project", ".", "root_path", ")", ")", ":", "self", ".", "cur...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
Projects.get_active_project_path
Get path of the active project
spyder/plugins/projects/plugin.py
def get_active_project_path(self): """Get path of the active project""" active_project_path = None if self.current_active_project: active_project_path = self.current_active_project.root_path return active_project_path
def get_active_project_path(self): """Get path of the active project""" active_project_path = None if self.current_active_project: active_project_path = self.current_active_project.root_path return active_project_path
[ "Get", "path", "of", "the", "active", "project" ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/projects/plugin.py#L405-L410
[ "def", "get_active_project_path", "(", "self", ")", ":", "active_project_path", "=", "None", "if", "self", ".", "current_active_project", ":", "active_project_path", "=", "self", ".", "current_active_project", ".", "root_path", "return", "active_project_path" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
Projects.get_pythonpath
Get project path as a list to be added to PYTHONPATH
spyder/plugins/projects/plugin.py
def get_pythonpath(self, at_start=False): """Get project path as a list to be added to PYTHONPATH""" if at_start: current_path = self.get_option('current_project_path', default=None) else: current_path = self.get_active_pro...
def get_pythonpath(self, at_start=False): """Get project path as a list to be added to PYTHONPATH""" if at_start: current_path = self.get_option('current_project_path', default=None) else: current_path = self.get_active_pro...
[ "Get", "project", "path", "as", "a", "list", "to", "be", "added", "to", "PYTHONPATH" ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/projects/plugin.py#L412-L422
[ "def", "get_pythonpath", "(", "self", ",", "at_start", "=", "False", ")", ":", "if", "at_start", ":", "current_path", "=", "self", ".", "get_option", "(", "'current_project_path'", ",", "default", "=", "None", ")", "else", ":", "current_path", "=", "self", ...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
Projects.save_config
Save configuration: opened projects & tree widget state. Also save whether dock widget is visible if a project is open.
spyder/plugins/projects/plugin.py
def save_config(self): """ Save configuration: opened projects & tree widget state. Also save whether dock widget is visible if a project is open. """ self.set_option('recent_projects', self.recent_projects) self.set_option('expanded_state', ...
def save_config(self): """ Save configuration: opened projects & tree widget state. Also save whether dock widget is visible if a project is open. """ self.set_option('recent_projects', self.recent_projects) self.set_option('expanded_state', ...
[ "Save", "configuration", ":", "opened", "projects", "&", "tree", "widget", "state", ".", "Also", "save", "whether", "dock", "widget", "is", "visible", "if", "a", "project", "is", "open", "." ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/projects/plugin.py#L429-L442
[ "def", "save_config", "(", "self", ")", ":", "self", ".", "set_option", "(", "'recent_projects'", ",", "self", ".", "recent_projects", ")", "self", ".", "set_option", "(", "'expanded_state'", ",", "self", ".", "explorer", ".", "treewidget", ".", "get_expanded_...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
Projects.show_explorer
Show the explorer
spyder/plugins/projects/plugin.py
def show_explorer(self): """Show the explorer""" if self.dockwidget is not None: if self.dockwidget.isHidden(): self.dockwidget.show() self.dockwidget.raise_() self.dockwidget.update()
def show_explorer(self): """Show the explorer""" if self.dockwidget is not None: if self.dockwidget.isHidden(): self.dockwidget.show() self.dockwidget.raise_() self.dockwidget.update()
[ "Show", "the", "explorer" ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/projects/plugin.py#L465-L471
[ "def", "show_explorer", "(", "self", ")", ":", "if", "self", ".", "dockwidget", "is", "not", "None", ":", "if", "self", ".", "dockwidget", ".", "isHidden", "(", ")", ":", "self", ".", "dockwidget", ".", "show", "(", ")", "self", ".", "dockwidget", "....
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
Projects.is_valid_project
Check if a directory is a valid Spyder project
spyder/plugins/projects/plugin.py
def is_valid_project(self, path): """Check if a directory is a valid Spyder project""" spy_project_dir = osp.join(path, '.spyproject') if osp.isdir(path) and osp.isdir(spy_project_dir): return True else: return False
def is_valid_project(self, path): """Check if a directory is a valid Spyder project""" spy_project_dir = osp.join(path, '.spyproject') if osp.isdir(path) and osp.isdir(spy_project_dir): return True else: return False
[ "Check", "if", "a", "directory", "is", "a", "valid", "Spyder", "project" ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/projects/plugin.py#L478-L484
[ "def", "is_valid_project", "(", "self", ",", "path", ")", ":", "spy_project_dir", "=", "osp", ".", "join", "(", "path", ",", "'.spyproject'", ")", "if", "osp", ".", "isdir", "(", "path", ")", "and", "osp", ".", "isdir", "(", "spy_project_dir", ")", ":"...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
Projects.add_to_recent
Add an entry to recent projetcs We only maintain the list of the 10 most recent projects
spyder/plugins/projects/plugin.py
def add_to_recent(self, project): """ Add an entry to recent projetcs We only maintain the list of the 10 most recent projects """ if project not in self.recent_projects: self.recent_projects.insert(0, project) self.recent_projects = self.recent_p...
def add_to_recent(self, project): """ Add an entry to recent projetcs We only maintain the list of the 10 most recent projects """ if project not in self.recent_projects: self.recent_projects.insert(0, project) self.recent_projects = self.recent_p...
[ "Add", "an", "entry", "to", "recent", "projetcs", "We", "only", "maintain", "the", "list", "of", "the", "10", "most", "recent", "projects" ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/projects/plugin.py#L486-L494
[ "def", "add_to_recent", "(", "self", ",", "project", ")", ":", "if", "project", "not", "in", "self", ".", "recent_projects", ":", "self", ".", "recent_projects", ".", "insert", "(", "0", ",", "project", ")", "self", ".", "recent_projects", "=", "self", "...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
set_attached_console_visible
Show/hide system console window attached to current process. Return it's previous state. Availability: Windows
spyder/utils/windows.py
def set_attached_console_visible(state): """Show/hide system console window attached to current process. Return it's previous state. Availability: Windows""" flag = {True: SW_SHOW, False: SW_HIDE} return bool(ShowWindow(console_window_handle, flag[state]))
def set_attached_console_visible(state): """Show/hide system console window attached to current process. Return it's previous state. Availability: Windows""" flag = {True: SW_SHOW, False: SW_HIDE} return bool(ShowWindow(console_window_handle, flag[state]))
[ "Show", "/", "hide", "system", "console", "window", "attached", "to", "current", "process", ".", "Return", "it", "s", "previous", "state", ".", "Availability", ":", "Windows" ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/utils/windows.py#L27-L33
[ "def", "set_attached_console_visible", "(", "state", ")", ":", "flag", "=", "{", "True", ":", "SW_SHOW", ",", "False", ":", "SW_HIDE", "}", "return", "bool", "(", "ShowWindow", "(", "console_window_handle", ",", "flag", "[", "state", "]", ")", ")" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
get_family
Return the first installed font family in family list
spyder/config/gui.py
def get_family(families): """Return the first installed font family in family list""" if not isinstance(families, list): families = [ families ] for family in families: if font_is_installed(family): return family else: print("Warning: None of the following fonts is in...
def get_family(families): """Return the first installed font family in family list""" if not isinstance(families, list): families = [ families ] for family in families: if font_is_installed(family): return family else: print("Warning: None of the following fonts is in...
[ "Return", "the", "first", "installed", "font", "family", "in", "family", "list" ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/config/gui.py#L45-L54
[ "def", "get_family", "(", "families", ")", ":", "if", "not", "isinstance", "(", "families", ",", "list", ")", ":", "families", "=", "[", "families", "]", "for", "family", "in", "families", ":", "if", "font_is_installed", "(", "family", ")", ":", "return"...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
get_font
Get console font properties depending on OS and user options
spyder/config/gui.py
def get_font(section='appearance', option='font', font_size_delta=0): """Get console font properties depending on OS and user options""" font = FONT_CACHE.get((section, option)) if font is None: families = CONF.get(section, option+"/family", None) if families is None: return QF...
def get_font(section='appearance', option='font', font_size_delta=0): """Get console font properties depending on OS and user options""" font = FONT_CACHE.get((section, option)) if font is None: families = CONF.get(section, option+"/family", None) if families is None: return QF...
[ "Get", "console", "font", "properties", "depending", "on", "OS", "and", "user", "options" ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/config/gui.py#L59-L83
[ "def", "get_font", "(", "section", "=", "'appearance'", ",", "option", "=", "'font'", ",", "font_size_delta", "=", "0", ")", ":", "font", "=", "FONT_CACHE", ".", "get", "(", "(", "section", ",", "option", ")", ")", "if", "font", "is", "None", ":", "f...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
set_font
Set font
spyder/config/gui.py
def set_font(font, section='appearance', option='font'): """Set font""" CONF.set(section, option+'/family', to_text_string(font.family())) CONF.set(section, option+'/size', float(font.pointSize())) CONF.set(section, option+'/italic', int(font.italic())) CONF.set(section, option+'/bold', int(font.bol...
def set_font(font, section='appearance', option='font'): """Set font""" CONF.set(section, option+'/family', to_text_string(font.family())) CONF.set(section, option+'/size', float(font.pointSize())) CONF.set(section, option+'/italic', int(font.italic())) CONF.set(section, option+'/bold', int(font.bol...
[ "Set", "font" ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/config/gui.py#L86-L92
[ "def", "set_font", "(", "font", ",", "section", "=", "'appearance'", ",", "option", "=", "'font'", ")", ":", "CONF", ".", "set", "(", "section", ",", "option", "+", "'/family'", ",", "to_text_string", "(", "font", ".", "family", "(", ")", ")", ")", "...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
fixed_shortcut
DEPRECATED: This function will be removed in Spyder 4.0 Define a fixed shortcut according to a keysequence string
spyder/config/gui.py
def fixed_shortcut(keystr, parent, action): """ DEPRECATED: This function will be removed in Spyder 4.0 Define a fixed shortcut according to a keysequence string """ sc = QShortcut(QKeySequence(keystr), parent, action) sc.setContext(Qt.WidgetWithChildrenShortcut) return sc
def fixed_shortcut(keystr, parent, action): """ DEPRECATED: This function will be removed in Spyder 4.0 Define a fixed shortcut according to a keysequence string """ sc = QShortcut(QKeySequence(keystr), parent, action) sc.setContext(Qt.WidgetWithChildrenShortcut) return sc
[ "DEPRECATED", ":", "This", "function", "will", "be", "removed", "in", "Spyder", "4", ".", "0" ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/config/gui.py#L105-L113
[ "def", "fixed_shortcut", "(", "keystr", ",", "parent", ",", "action", ")", ":", "sc", "=", "QShortcut", "(", "QKeySequence", "(", "keystr", ")", ",", "parent", ",", "action", ")", "sc", ".", "setContext", "(", "Qt", ".", "WidgetWithChildrenShortcut", ")", ...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
config_shortcut
Create a Shortcut namedtuple for a widget The data contained in this tuple will be registered in our shortcuts preferences page
spyder/config/gui.py
def config_shortcut(action, context, name, parent): """ Create a Shortcut namedtuple for a widget The data contained in this tuple will be registered in our shortcuts preferences page """ keystr = get_shortcut(context, name) qsc = QShortcut(QKeySequence(keystr), parent, action) qsc....
def config_shortcut(action, context, name, parent): """ Create a Shortcut namedtuple for a widget The data contained in this tuple will be registered in our shortcuts preferences page """ keystr = get_shortcut(context, name) qsc = QShortcut(QKeySequence(keystr), parent, action) qsc....
[ "Create", "a", "Shortcut", "namedtuple", "for", "a", "widget", "The", "data", "contained", "in", "this", "tuple", "will", "be", "registered", "in", "our", "shortcuts", "preferences", "page" ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/config/gui.py#L116-L127
[ "def", "config_shortcut", "(", "action", ",", "context", ",", "name", ",", "parent", ")", ":", "keystr", "=", "get_shortcut", "(", "context", ",", "name", ")", "qsc", "=", "QShortcut", "(", "QKeySequence", "(", "keystr", ")", ",", "parent", ",", "action"...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
iter_shortcuts
Iterate over keyboard shortcuts.
spyder/config/gui.py
def iter_shortcuts(): """Iterate over keyboard shortcuts.""" for context_name, keystr in CONF.items('shortcuts'): context, name = context_name.split("/", 1) yield context, name, keystr
def iter_shortcuts(): """Iterate over keyboard shortcuts.""" for context_name, keystr in CONF.items('shortcuts'): context, name = context_name.split("/", 1) yield context, name, keystr
[ "Iterate", "over", "keyboard", "shortcuts", "." ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/config/gui.py#L130-L134
[ "def", "iter_shortcuts", "(", ")", ":", "for", "context_name", ",", "keystr", "in", "CONF", ".", "items", "(", "'shortcuts'", ")", ":", "context", ",", "name", "=", "context_name", ".", "split", "(", "\"/\"", ",", "1", ")", "yield", "context", ",", "na...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
get_color_scheme
Get syntax color scheme
spyder/config/gui.py
def get_color_scheme(name): """Get syntax color scheme""" color_scheme = {} for key in sh.COLOR_SCHEME_KEYS: color_scheme[key] = CONF.get("appearance", "%s/%s" % (name, key)) return color_scheme
def get_color_scheme(name): """Get syntax color scheme""" color_scheme = {} for key in sh.COLOR_SCHEME_KEYS: color_scheme[key] = CONF.get("appearance", "%s/%s" % (name, key)) return color_scheme
[ "Get", "syntax", "color", "scheme" ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/config/gui.py#L142-L147
[ "def", "get_color_scheme", "(", "name", ")", ":", "color_scheme", "=", "{", "}", "for", "key", "in", "sh", ".", "COLOR_SCHEME_KEYS", ":", "color_scheme", "[", "key", "]", "=", "CONF", ".", "get", "(", "\"appearance\"", ",", "\"%s/%s\"", "%", "(", "name",...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
set_color_scheme
Set syntax color scheme
spyder/config/gui.py
def set_color_scheme(name, color_scheme, replace=True): """Set syntax color scheme""" section = "appearance" names = CONF.get("appearance", "names", []) for key in sh.COLOR_SCHEME_KEYS: option = "%s/%s" % (name, key) value = CONF.get(section, option, default=None) if value is Non...
def set_color_scheme(name, color_scheme, replace=True): """Set syntax color scheme""" section = "appearance" names = CONF.get("appearance", "names", []) for key in sh.COLOR_SCHEME_KEYS: option = "%s/%s" % (name, key) value = CONF.get(section, option, default=None) if value is Non...
[ "Set", "syntax", "color", "scheme" ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/config/gui.py#L150-L160
[ "def", "set_color_scheme", "(", "name", ",", "color_scheme", ",", "replace", "=", "True", ")", ":", "section", "=", "\"appearance\"", "names", "=", "CONF", ".", "get", "(", "\"appearance\"", ",", "\"names\"", ",", "[", "]", ")", "for", "key", "in", "sh",...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
set_default_color_scheme
Reset color scheme to default values
spyder/config/gui.py
def set_default_color_scheme(name, replace=True): """Reset color scheme to default values""" assert name in sh.COLOR_SCHEME_NAMES set_color_scheme(name, sh.get_color_scheme(name), replace=replace)
def set_default_color_scheme(name, replace=True): """Reset color scheme to default values""" assert name in sh.COLOR_SCHEME_NAMES set_color_scheme(name, sh.get_color_scheme(name), replace=replace)
[ "Reset", "color", "scheme", "to", "default", "values" ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/config/gui.py#L163-L166
[ "def", "set_default_color_scheme", "(", "name", ",", "replace", "=", "True", ")", ":", "assert", "name", "in", "sh", ".", "COLOR_SCHEME_NAMES", "set_color_scheme", "(", "name", ",", "sh", ".", "get_color_scheme", "(", "name", ")", ",", "replace", "=", "repla...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
is_dark_font_color
Check if the font color used in the color scheme is dark.
spyder/config/gui.py
def is_dark_font_color(color_scheme): """Check if the font color used in the color scheme is dark.""" color_scheme = get_color_scheme(color_scheme) font_color, fon_fw, fon_fs = color_scheme['normal'] return dark_color(font_color)
def is_dark_font_color(color_scheme): """Check if the font color used in the color scheme is dark.""" color_scheme = get_color_scheme(color_scheme) font_color, fon_fw, fon_fs = color_scheme['normal'] return dark_color(font_color)
[ "Check", "if", "the", "font", "color", "used", "in", "the", "color", "scheme", "is", "dark", "." ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/config/gui.py#L169-L173
[ "def", "is_dark_font_color", "(", "color_scheme", ")", ":", "color_scheme", "=", "get_color_scheme", "(", "color_scheme", ")", "font_color", ",", "fon_fw", ",", "fon_fs", "=", "color_scheme", "[", "'normal'", "]", "return", "dark_color", "(", "font_color", ")" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
TabFilter.eventFilter
Filter mouse press events. Events that are captured and not propagated return True. Events that are not captured and are propagated return False.
spyder/widgets/dock.py
def eventFilter(self, obj, event): """Filter mouse press events. Events that are captured and not propagated return True. Events that are not captured and are propagated return False. """ event_type = event.type() if event_type == QEvent.MouseButtonPress: sel...
def eventFilter(self, obj, event): """Filter mouse press events. Events that are captured and not propagated return True. Events that are not captured and are propagated return False. """ event_type = event.type() if event_type == QEvent.MouseButtonPress: sel...
[ "Filter", "mouse", "press", "events", "." ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/widgets/dock.py#L32-L42
[ "def", "eventFilter", "(", "self", ",", "obj", ",", "event", ")", ":", "event_type", "=", "event", ".", "type", "(", ")", "if", "event_type", "==", "QEvent", ".", "MouseButtonPress", ":", "self", ".", "tab_pressed", "(", "event", ")", "return", "False", ...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
TabFilter.tab_pressed
Method called when a tab from a QTabBar has been pressed.
spyder/widgets/dock.py
def tab_pressed(self, event): """Method called when a tab from a QTabBar has been pressed.""" self.from_index = self.dock_tabbar.tabAt(event.pos()) self.dock_tabbar.setCurrentIndex(self.from_index) if event.button() == Qt.RightButton: if self.from_index == -1: ...
def tab_pressed(self, event): """Method called when a tab from a QTabBar has been pressed.""" self.from_index = self.dock_tabbar.tabAt(event.pos()) self.dock_tabbar.setCurrentIndex(self.from_index) if event.button() == Qt.RightButton: if self.from_index == -1: ...
[ "Method", "called", "when", "a", "tab", "from", "a", "QTabBar", "has", "been", "pressed", "." ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/widgets/dock.py#L44-L53
[ "def", "tab_pressed", "(", "self", ",", "event", ")", ":", "self", ".", "from_index", "=", "self", ".", "dock_tabbar", ".", "tabAt", "(", "event", ".", "pos", "(", ")", ")", "self", ".", "dock_tabbar", ".", "setCurrentIndex", "(", "self", ".", "from_in...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
TabFilter.show_nontab_menu
Show the context menu assigned to nontabs section.
spyder/widgets/dock.py
def show_nontab_menu(self, event): """Show the context menu assigned to nontabs section.""" menu = self.main.createPopupMenu() menu.exec_(self.dock_tabbar.mapToGlobal(event.pos()))
def show_nontab_menu(self, event): """Show the context menu assigned to nontabs section.""" menu = self.main.createPopupMenu() menu.exec_(self.dock_tabbar.mapToGlobal(event.pos()))
[ "Show", "the", "context", "menu", "assigned", "to", "nontabs", "section", "." ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/widgets/dock.py#L59-L62
[ "def", "show_nontab_menu", "(", "self", ",", "event", ")", ":", "menu", "=", "self", ".", "main", ".", "createPopupMenu", "(", ")", "menu", ".", "exec_", "(", "self", ".", "dock_tabbar", ".", "mapToGlobal", "(", "event", ".", "pos", "(", ")", ")", ")...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
SpyderDockWidget.install_tab_event_filter
Install an event filter to capture mouse events in the tabs of a QTabBar holding tabified dockwidgets.
spyder/widgets/dock.py
def install_tab_event_filter(self, value): """ Install an event filter to capture mouse events in the tabs of a QTabBar holding tabified dockwidgets. """ dock_tabbar = None tabbars = self.main.findChildren(QTabBar) for tabbar in tabbars: for tab in ran...
def install_tab_event_filter(self, value): """ Install an event filter to capture mouse events in the tabs of a QTabBar holding tabified dockwidgets. """ dock_tabbar = None tabbars = self.main.findChildren(QTabBar) for tabbar in tabbars: for tab in ran...
[ "Install", "an", "event", "filter", "to", "capture", "mouse", "events", "in", "the", "tabs", "of", "a", "QTabBar", "holding", "tabified", "dockwidgets", "." ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/widgets/dock.py#L208-L227
[ "def", "install_tab_event_filter", "(", "self", ",", "value", ")", ":", "dock_tabbar", "=", "None", "tabbars", "=", "self", ".", "main", ".", "findChildren", "(", "QTabBar", ")", "for", "tabbar", "in", "tabbars", ":", "for", "tab", "in", "range", "(", "t...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
_load_all_bookmarks
Load all bookmarks from config.
spyder/plugins/editor/utils/bookmarks.py
def _load_all_bookmarks(): """Load all bookmarks from config.""" slots = CONF.get('editor', 'bookmarks', {}) for slot_num in list(slots.keys()): if not osp.isfile(slots[slot_num][0]): slots.pop(slot_num) return slots
def _load_all_bookmarks(): """Load all bookmarks from config.""" slots = CONF.get('editor', 'bookmarks', {}) for slot_num in list(slots.keys()): if not osp.isfile(slots[slot_num][0]): slots.pop(slot_num) return slots
[ "Load", "all", "bookmarks", "from", "config", "." ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/utils/bookmarks.py#L17-L23
[ "def", "_load_all_bookmarks", "(", ")", ":", "slots", "=", "CONF", ".", "get", "(", "'editor'", ",", "'bookmarks'", ",", "{", "}", ")", "for", "slot_num", "in", "list", "(", "slots", ".", "keys", "(", ")", ")", ":", "if", "not", "osp", ".", "isfile...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
load_bookmarks
Load all bookmarks for a specific file from config.
spyder/plugins/editor/utils/bookmarks.py
def load_bookmarks(filename): """Load all bookmarks for a specific file from config.""" bookmarks = _load_all_bookmarks() return {k: v for k, v in bookmarks.items() if v[0] == filename}
def load_bookmarks(filename): """Load all bookmarks for a specific file from config.""" bookmarks = _load_all_bookmarks() return {k: v for k, v in bookmarks.items() if v[0] == filename}
[ "Load", "all", "bookmarks", "for", "a", "specific", "file", "from", "config", "." ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/utils/bookmarks.py#L26-L29
[ "def", "load_bookmarks", "(", "filename", ")", ":", "bookmarks", "=", "_load_all_bookmarks", "(", ")", "return", "{", "k", ":", "v", "for", "k", ",", "v", "in", "bookmarks", ".", "items", "(", ")", "if", "v", "[", "0", "]", "==", "filename", "}" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
load_bookmarks_without_file
Load all bookmarks but those from a specific file.
spyder/plugins/editor/utils/bookmarks.py
def load_bookmarks_without_file(filename): """Load all bookmarks but those from a specific file.""" bookmarks = _load_all_bookmarks() return {k: v for k, v in bookmarks.items() if v[0] != filename}
def load_bookmarks_without_file(filename): """Load all bookmarks but those from a specific file.""" bookmarks = _load_all_bookmarks() return {k: v for k, v in bookmarks.items() if v[0] != filename}
[ "Load", "all", "bookmarks", "but", "those", "from", "a", "specific", "file", "." ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/utils/bookmarks.py#L32-L35
[ "def", "load_bookmarks_without_file", "(", "filename", ")", ":", "bookmarks", "=", "_load_all_bookmarks", "(", ")", "return", "{", "k", ":", "v", "for", "k", ",", "v", "in", "bookmarks", ".", "items", "(", ")", "if", "v", "[", "0", "]", "!=", "filename...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
save_bookmarks
Save all bookmarks from specific file to config.
spyder/plugins/editor/utils/bookmarks.py
def save_bookmarks(filename, bookmarks): """Save all bookmarks from specific file to config.""" if not osp.isfile(filename): return slots = load_bookmarks_without_file(filename) for slot_num, content in bookmarks.items(): slots[slot_num] = [filename, content[0], content[1]] CONF.set(...
def save_bookmarks(filename, bookmarks): """Save all bookmarks from specific file to config.""" if not osp.isfile(filename): return slots = load_bookmarks_without_file(filename) for slot_num, content in bookmarks.items(): slots[slot_num] = [filename, content[0], content[1]] CONF.set(...
[ "Save", "all", "bookmarks", "from", "specific", "file", "to", "config", "." ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/utils/bookmarks.py#L38-L45
[ "def", "save_bookmarks", "(", "filename", ",", "bookmarks", ")", ":", "if", "not", "osp", ".", "isfile", "(", "filename", ")", ":", "return", "slots", "=", "load_bookmarks_without_file", "(", "filename", ")", "for", "slot_num", ",", "content", "in", "bookmar...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
Editor.report_open_file
Request to start a LSP server to attend a language.
spyder/plugins/editor/plugin.py
def report_open_file(self, options): """Request to start a LSP server to attend a language.""" filename = options['filename'] logger.debug('Call LSP for %s' % filename) language = options['language'] callback = options['codeeditor'] stat = self.main.lspmanager.start...
def report_open_file(self, options): """Request to start a LSP server to attend a language.""" filename = options['filename'] logger.debug('Call LSP for %s' % filename) language = options['language'] callback = options['codeeditor'] stat = self.main.lspmanager.start...
[ "Request", "to", "start", "a", "LSP", "server", "to", "attend", "a", "language", "." ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L275-L291
[ "def", "report_open_file", "(", "self", ",", "options", ")", ":", "filename", "=", "options", "[", "'filename'", "]", "logger", ".", "debug", "(", "'Call LSP for %s'", "%", "filename", ")", "language", "=", "options", "[", "'language'", "]", "callback", "=",...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
Editor.register_lsp_server_settings
Register LSP server settings.
spyder/plugins/editor/plugin.py
def register_lsp_server_settings(self, settings, language): """Register LSP server settings.""" self.lsp_editor_settings[language] = settings logger.debug('LSP server settings for {!s} are: {!r}'.format( language, settings)) self.lsp_server_ready(language, self.lsp_edito...
def register_lsp_server_settings(self, settings, language): """Register LSP server settings.""" self.lsp_editor_settings[language] = settings logger.debug('LSP server settings for {!s} are: {!r}'.format( language, settings)) self.lsp_server_ready(language, self.lsp_edito...
[ "Register", "LSP", "server", "settings", "." ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L294-L299
[ "def", "register_lsp_server_settings", "(", "self", ",", "settings", ",", "language", ")", ":", "self", ".", "lsp_editor_settings", "[", "language", "]", "=", "settings", "logger", ".", "debug", "(", "'LSP server settings for {!s} are: {!r}'", ".", "format", "(", ...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
Editor.lsp_server_ready
Notify all stackeditors about LSP server availability.
spyder/plugins/editor/plugin.py
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): """Notify all stackeditors about LSP server availability.""" for editorstack in self.editorstacks: editorstack.notify_server_ready(language, configuration)
[ "Notify", "all", "stackeditors", "about", "LSP", "server", "availability", "." ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L301-L304
[ "def", "lsp_server_ready", "(", "self", ",", "language", ",", "configuration", ")", ":", "for", "editorstack", "in", "self", ".", "editorstacks", ":", "editorstack", ".", "notify_server_ready", "(", "language", ",", "configuration", ")" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
Editor.visibility_changed
DockWidget visibility has changed
spyder/plugins/editor/plugin.py
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): """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...
[ "DockWidget", "visibility", "has", "changed" ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L329-L340
[ "def", "visibility_changed", "(", "self", ",", "enable", ")", ":", "SpyderPluginWidget", ".", "visibility_changed", "(", "self", ",", "enable", ")", "if", "self", ".", "dockwidget", "is", "None", ":", "return", "if", "self", ".", "dockwidget", ".", "isWindow...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
Editor.closing_plugin
Perform actions before parent main window is closed
spyder/plugins/editor/plugin.py
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): """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...
[ "Perform", "actions", "before", "parent", "main", "window", "is", "closed" ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L348-L382
[ "def", "closing_plugin", "(", "self", ",", "cancelable", "=", "False", ")", ":", "state", "=", "self", ".", "splitter", ".", "saveState", "(", ")", "self", ".", "set_option", "(", "'splitter_state'", ",", "qbytearray_to_str", "(", "state", ")", ")", "filen...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
Editor.get_plugin_actions
Return a list of actions related to plugin
spyder/plugins/editor/plugin.py
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): """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...
[ "Return", "a", "list", "of", "actions", "related", "to", "plugin" ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L384-L944
[ "def", "get_plugin_actions", "(", "self", ")", ":", "# ---- File menu and toolbar ----\r", "self", ".", "new_action", "=", "create_action", "(", "self", ",", "_", "(", "\"&New file...\"", ")", ",", "icon", "=", "ima", ".", "icon", "(", "'filenew'", ")", ",", ...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
Editor.register_plugin
Register plugin in Spyder's main window
spyder/plugins/editor/plugin.py
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): """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) ...
[ "Register", "plugin", "in", "Spyder", "s", "main", "window" ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L946-L962
[ "def", "register_plugin", "(", "self", ")", ":", "self", ".", "main", ".", "restore_scrollbar_position", ".", "connect", "(", "self", ".", "restore_scrollbar_position", ")", "self", ".", "main", ".", "console", ".", "edit_goto", ".", "connect", "(", "self", ...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
Editor.update_font
Update font from Preferences
spyder/plugins/editor/plugin.py
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): """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...
[ "Update", "font", "from", "Preferences" ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L964-L973
[ "def", "update_font", "(", "self", ")", ":", "font", "=", "self", ".", "get_plugin_font", "(", ")", "color_scheme", "=", "self", ".", "get_color_scheme", "(", ")", "for", "editorstack", "in", "self", ".", "editorstacks", ":", "editorstack", ".", "set_default...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
Editor._create_checkable_action
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...
spyder/plugins/editor/plugin.py
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): """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 ...
[ "Helper", "function", "to", "create", "a", "checkable", "action", ".", "Args", ":", "text", "(", "str", ")", ":", "Text", "to", "be", "displayed", "in", "the", "action", ".", "conf_name", "(", "str", ")", ":", "configuration", "setting", "associated", "w...
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L975-L990
[ "def", "_create_checkable_action", "(", "self", ",", "text", ",", "conf_name", ",", "editorstack_method", ")", ":", "def", "toogle", "(", "checked", ")", ":", "self", ".", "switch_to_plugin", "(", ")", "self", ".", "_toggle_checkable_action", "(", "checked", "...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
Editor._toggle_checkable_action
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...
spyder/plugins/editor/plugin.py
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): """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 ...
[ "Handle", "the", "toogle", "of", "a", "checkable", "action", ".", "Update", "editorstacks", "and", "the", "configuration", ".", "Args", ":", "checked", "(", "bool", ")", ":", "State", "of", "the", "action", ".", "editorstack_method", "(", "str", ")", ":", ...
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L993-L1018
[ "def", "_toggle_checkable_action", "(", "self", ",", "checked", ",", "editorstack_method", ",", "conf_name", ")", ":", "if", "self", ".", "editorstacks", ":", "for", "editorstack", "in", "self", ".", "editorstacks", ":", "try", ":", "editorstack", ".", "__geta...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
Editor.received_sig_option_changed
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.
spyder/plugins/editor/plugin.py
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): """ 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': ...
[ "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", "." ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L1020-L1031
[ "def", "received_sig_option_changed", "(", "self", ",", "option", ",", "value", ")", ":", "if", "option", "==", "'autosave_mapping'", ":", "for", "editorstack", "in", "self", ".", "editorstacks", ":", "if", "editorstack", "!=", "self", ".", "sender", "(", ")...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
Editor.unregister_editorstack
Removing editorstack only if it's not the last remaining
spyder/plugins/editor/plugin.py
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): """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) ...
[ "Removing", "editorstack", "only", "if", "it", "s", "not", "the", "last", "remaining" ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L1202-L1211
[ "def", "unregister_editorstack", "(", "self", ",", "editorstack", ")", ":", "self", ".", "remove_last_focus_editorstack", "(", "editorstack", ")", "if", "len", "(", "self", ".", "editorstacks", ")", ">", "1", ":", "index", "=", "self", ".", "editorstacks", "...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
Editor.setup_other_windows
Setup toolbars and menus for 'New window' instances
spyder/plugins/editor/plugin.py
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): """Setup toolbars and menus for 'New window' instances""" self.toolbar_list = ((_("File toolbar"), "file_toolbar", self.main.file_toolbar_actions), (_("Search toolbar"), "search_toolbar", ...
[ "Setup", "toolbars", "and", "menus", "for", "New", "window", "instances" ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L1245-L1271
[ "def", "setup_other_windows", "(", "self", ")", ":", "self", ".", "toolbar_list", "=", "(", "(", "_", "(", "\"File toolbar\"", ")", ",", "\"file_toolbar\"", ",", "self", ".", "main", ".", "file_toolbar_actions", ")", ",", "(", "_", "(", "\"Search toolbar\"",...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
Editor.set_current_filename
Set focus to *filename* if this file has been opened. Return the editor instance associated to *filename*.
spyder/plugins/editor/plugin.py
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): """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...
[ "Set", "focus", "to", "*", "filename", "*", "if", "this", "file", "has", "been", "opened", ".", "Return", "the", "editor", "instance", "associated", "to", "*", "filename", "*", "." ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L1343-L1349
[ "def", "set_current_filename", "(", "self", ",", "filename", ",", "editorwindow", "=", "None", ",", "focus", "=", "True", ")", ":", "editorstack", "=", "self", ".", "get_current_editorstack", "(", "editorwindow", ")", "return", "editorstack", ".", "set_current_f...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
Editor.refresh_file_dependent_actions
Enable/disable file dependent actions (only if dockwidget is visible)
spyder/plugins/editor/plugin.py
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): """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: ...
[ "Enable", "/", "disable", "file", "dependent", "actions", "(", "only", "if", "dockwidget", "is", "visible", ")" ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L1365-L1371
[ "def", "refresh_file_dependent_actions", "(", "self", ")", ":", "if", "self", ".", "dockwidget", "and", "self", ".", "dockwidget", ".", "isVisible", "(", ")", ":", "enable", "=", "self", ".", "get_current_editor", "(", ")", "is", "not", "None", "for", "act...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
Editor.refresh_save_all_action
Enable 'Save All' if there are files to be saved
spyder/plugins/editor/plugin.py
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): """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) ...
[ "Enable", "Save", "All", "if", "there", "are", "files", "to", "be", "saved" ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L1373-L1379
[ "def", "refresh_save_all_action", "(", "self", ")", ":", "editorstack", "=", "self", ".", "get_current_editorstack", "(", ")", "if", "editorstack", ":", "state", "=", "any", "(", "finfo", ".", "editor", ".", "document", "(", ")", ".", "isModified", "(", ")...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
Editor.update_warning_menu
Update warning list menu
spyder/plugins/editor/plugin.py
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): """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...
[ "Update", "warning", "list", "menu" ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L1381-L1393
[ "def", "update_warning_menu", "(", "self", ")", ":", "editor", "=", "self", ".", "get_current_editor", "(", ")", "check_results", "=", "editor", ".", "get_current_warnings", "(", ")", "self", ".", "warning_menu", ".", "clear", "(", ")", "filename", "=", "sel...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
Editor.update_todo_menu
Update todo list menu
spyder/plugins/editor/plugin.py
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): """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...
[ "Update", "todo", "list", "menu" ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L1395-L1406
[ "def", "update_todo_menu", "(", "self", ")", ":", "editorstack", "=", "self", ".", "get_current_editorstack", "(", ")", "results", "=", "editorstack", ".", "get_todo_results", "(", ")", "self", ".", "todo_menu", ".", "clear", "(", ")", "filename", "=", "self...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
Editor.todo_results_changed
Synchronize todo results between editorstacks Refresh todo list navigation buttons
spyder/plugins/editor/plugin.py
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): """ 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...
[ "Synchronize", "todo", "results", "between", "editorstacks", "Refresh", "todo", "list", "navigation", "buttons" ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L1408-L1421
[ "def", "todo_results_changed", "(", "self", ")", ":", "editorstack", "=", "self", ".", "get_current_editorstack", "(", ")", "results", "=", "editorstack", ".", "get_todo_results", "(", ")", "index", "=", "editorstack", ".", "get_stack_index", "(", ")", "if", "...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
Editor.opened_files_list_changed
Opened files list has changed: --> open/close file action --> modification ('*' added to title) --> current edited file has changed
spyder/plugins/editor/plugin.py
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): """ 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...
[ "Opened", "files", "list", "has", "changed", ":", "--", ">", "open", "/", "close", "file", "action", "--", ">", "modification", "(", "*", "added", "to", "title", ")", "--", ">", "current", "edited", "file", "has", "changed" ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L1436-L1458
[ "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", "="...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
Editor.update_code_analysis_actions
Update actions in the warnings menu.
spyder/plugins/editor/plugin.py
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): """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 ...
[ "Update", "actions", "in", "the", "warnings", "menu", "." ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L1460-L1474
[ "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", "(", ")"...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
Editor.save_bookmarks
Receive bookmark changes and save them.
spyder/plugins/editor/plugin.py
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): """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,...
[ "Receive", "bookmark", "changes", "and", "save", "them", "." ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L1508-L1514
[ "def", "save_bookmarks", "(", "self", ",", "filename", ",", "bookmarks", ")", ":", "filename", "=", "to_text_string", "(", "filename", ")", "bookmarks", "=", "to_text_string", "(", "bookmarks", ")", "filename", "=", "osp", ".", "normpath", "(", "osp", ".", ...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
Editor.__load_temp_file
Load temporary file from a text file in user home directory
spyder/plugins/editor/plugin.py
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): """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"), '', ...
[ "Load", "temporary", "file", "from", "a", "text", "file", "in", "user", "home", "directory" ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L1517-L1534
[ "def", "__load_temp_file", "(", "self", ")", ":", "if", "not", "osp", ".", "isfile", "(", "self", ".", "TEMPFILE_PATH", ")", ":", "# Creating temporary file\r", "default", "=", "[", "'# -*- coding: utf-8 -*-'", ",", "'\"\"\"'", ",", "_", "(", "\"Spyder Editor\""...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
Editor.__set_workdir
Set current script directory as working directory
spyder/plugins/editor/plugin.py
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): """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)
[ "Set", "current", "script", "directory", "as", "working", "directory" ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L1537-L1542
[ "def", "__set_workdir", "(", "self", ")", ":", "fname", "=", "self", ".", "get_current_filename", "(", ")", "if", "fname", "is", "not", "None", ":", "directory", "=", "osp", ".", "dirname", "(", "osp", ".", "abspath", "(", "fname", ")", ")", "self", ...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
Editor.__add_recent_file
Add to recent file list
spyder/plugins/editor/plugin.py
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): """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...
[ "Add", "to", "recent", "file", "list" ]
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L1544-L1552
[ "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"...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
train
Editor._clone_file_everywhere
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)
spyder/plugins/editor/plugin.py
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): """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...
[ "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", "...
spyder-ide/spyder
python
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L1554-L1560
[ "def", "_clone_file_everywhere", "(", "self", ",", "finfo", ")", ":", "for", "editorstack", "in", "self", ".", "editorstacks", "[", "1", ":", "]", ":", "editor", "=", "editorstack", ".", "clone_editor_from", "(", "finfo", ",", "set_current", "=", "False", ...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0