repo stringlengths 7 54 | path stringlengths 4 223 | func_name stringlengths 1 134 | original_string stringlengths 75 104k | language stringclasses 1
value | code stringlengths 75 104k | code_tokens listlengths 20 28.4k | docstring stringlengths 1 46.3k | docstring_tokens listlengths 1 1.66k | sha stringlengths 40 40 | url stringlengths 87 315 | partition stringclasses 1
value | summary stringlengths 4 350 | obf_code stringlengths 7.85k 764k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
spyder-ide/spyder | spyder/utils/misc.py | regexp_error_msg | def regexp_error_msg(pattern):
"""
Return None if the pattern is a valid regular expression or
a string describing why the pattern is invalid.
"""
try:
re.compile(pattern)
except re.error as e:
return str(e)
return None | python | def regexp_error_msg(pattern):
"""
Return None if the pattern is a valid regular expression or
a string describing why the pattern is invalid.
"""
try:
re.compile(pattern)
except re.error as e:
return str(e)
return None | [
"def",
"regexp_error_msg",
"(",
"pattern",
")",
":",
"try",
":",
"re",
".",
"compile",
"(",
"pattern",
")",
"except",
"re",
".",
"error",
"as",
"e",
":",
"return",
"str",
"(",
"e",
")",
"return",
"None"
] | Return None if the pattern is a valid regular expression or
a string describing why the pattern is invalid. | [
"Return",
"None",
"if",
"the",
"pattern",
"is",
"a",
"valid",
"regular",
"expression",
"or",
"a",
"string",
"describing",
"why",
"the",
"pattern",
"is",
"invalid",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/utils/misc.py#L289-L298 | train | Return a string describing why the pattern is invalid. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/editor/utils/folding.py | FoldScope.get_range | def get_range(self, ignore_blank_lines=True):
"""
Gets the fold region range (start and end line).
.. note:: Start line do no encompass the trigger line.
:param ignore_blank_lines: True to ignore blank lines at the end of the
scope (the method will rewind to find that last ... | python | def get_range(self, ignore_blank_lines=True):
"""
Gets the fold region range (start and end line).
.. note:: Start line do no encompass the trigger line.
:param ignore_blank_lines: True to ignore blank lines at the end of the
scope (the method will rewind to find that last ... | [
"def",
"get_range",
"(",
"self",
",",
"ignore_blank_lines",
"=",
"True",
")",
":",
"ref_lvl",
"=",
"self",
".",
"trigger_level",
"first_line",
"=",
"self",
".",
"_trigger",
".",
"blockNumber",
"(",
")",
"block",
"=",
"self",
".",
"_trigger",
".",
"next",
... | Gets the fold region range (start and end line).
.. note:: Start line do no encompass the trigger line.
:param ignore_blank_lines: True to ignore blank lines at the end of the
scope (the method will rewind to find that last meaningful block
that is part of the fold scope).
... | [
"Gets",
"the",
"fold",
"region",
"range",
"(",
"start",
"and",
"end",
"line",
")",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/utils/folding.py#L71-L100 | train | Gets the start and end line of the fold region. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/editor/utils/folding.py | FoldScope.fold | def fold(self):
"""Folds the region."""
start, end = self.get_range()
TextBlockHelper.set_collapsed(self._trigger, True)
block = self._trigger.next()
while block.blockNumber() <= end and block.isValid():
block.setVisible(False)
block = block.next() | python | def fold(self):
"""Folds the region."""
start, end = self.get_range()
TextBlockHelper.set_collapsed(self._trigger, True)
block = self._trigger.next()
while block.blockNumber() <= end and block.isValid():
block.setVisible(False)
block = block.next() | [
"def",
"fold",
"(",
"self",
")",
":",
"start",
",",
"end",
"=",
"self",
".",
"get_range",
"(",
")",
"TextBlockHelper",
".",
"set_collapsed",
"(",
"self",
".",
"_trigger",
",",
"True",
")",
"block",
"=",
"self",
".",
"_trigger",
".",
"next",
"(",
")",... | Folds the region. | [
"Folds",
"the",
"region",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/utils/folding.py#L102-L109 | train | Folds the region. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/editor/utils/folding.py | FoldScope.unfold | def unfold(self):
"""Unfolds the region."""
# set all direct child blocks which are not triggers to be visible
self._trigger.setVisible(True)
TextBlockHelper.set_collapsed(self._trigger, False)
for block in self.blocks(ignore_blank_lines=False):
block.setVisible(True)... | python | def unfold(self):
"""Unfolds the region."""
# set all direct child blocks which are not triggers to be visible
self._trigger.setVisible(True)
TextBlockHelper.set_collapsed(self._trigger, False)
for block in self.blocks(ignore_blank_lines=False):
block.setVisible(True)... | [
"def",
"unfold",
"(",
"self",
")",
":",
"# set all direct child blocks which are not triggers to be visible",
"self",
".",
"_trigger",
".",
"setVisible",
"(",
"True",
")",
"TextBlockHelper",
".",
"set_collapsed",
"(",
"self",
".",
"_trigger",
",",
"False",
")",
"for... | Unfolds the region. | [
"Unfolds",
"the",
"region",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/utils/folding.py#L111-L119 | train | Unfolds the region. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/editor/utils/folding.py | FoldScope.blocks | 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... | python | 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",
")",
":",
"start",
",",
"end",
"=",
"self",
".",
"get_range",
"(",
"ignore_blank_lines",
"=",
"ignore_blank_lines",
")",
"block",
"=",
"self",
".",
"_trigger",
".",
"next",
"(",
")",
"... | 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. | [
"This",
"generator",
"generates",
"the",
"list",
"of",
"blocks",
"directly",
"under",
"the",
"fold",
"region",
".",
"This",
"list",
"does",
"not",
"contain",
"blocks",
"from",
"child",
"regions",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/utils/folding.py#L121-L132 | train | This generator generates the list of blocks under the fold
region. This generator returns the list of blocks that are part of the fold
region. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/editor/utils/folding.py | FoldScope.child_regions | 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... | python | 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",
")",
":",
"start",
",",
"end",
"=",
"self",
".",
"get_range",
"(",
")",
"block",
"=",
"self",
".",
"_trigger",
".",
"next",
"(",
")",
"ref_lvl",
"=",
"self",
".",
"scope_level",
"while",
"block",
".",
"blockNumber",... | This generator generates the list of direct child regions. | [
"This",
"generator",
"generates",
"the",
"list",
"of",
"direct",
"child",
"regions",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/utils/folding.py#L134-L144 | train | This generator generates the list of direct child regions. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/editor/utils/folding.py | FoldScope.parent | 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
... | python | 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",
")",
":",
"if",
"TextBlockHelper",
".",
"get_fold_lvl",
"(",
"self",
".",
"_trigger",
")",
">",
"0",
"and",
"self",
".",
"_trigger",
".",
"blockNumber",
"(",
")",
":",
"block",
"=",
"self",
".",
"_trigger",
".",
"previous"... | Return the parent scope.
:return: FoldScope or None | [
"Return",
"the",
"parent",
"scope",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/utils/folding.py#L146-L164 | train | Return the parent scope. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/editor/utils/folding.py | FoldScope.text | 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()... | python | 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",
")",
":",
"ret_val",
"=",
"[",
"]",
"block",
"=",
"self",
".",
"_trigger",
".",
"next",
"(",
")",
"_",
",",
"end",
"=",
"self",
".",
"get_range",
"(",
")",
"while",
"(",
... | 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 | [
"Get",
"the",
"scope",
"text",
"with",
"a",
"possible",
"maximum",
"number",
"of",
"lines",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/utils/folding.py#L166-L180 | train | Get the scope text. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/editor/utils/folding.py | IndentFoldDetector.detect_fold_level | 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... | python | 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",
")",
":",
"text",
"=",
"block",
".",
"text",
"(",
")",
"prev_lvl",
"=",
"TextBlockHelper",
"(",
")",
".",
"get_fold_lvl",
"(",
"prev_block",
")",
"# round down to previous indentation guid... | Detects fold level by looking at the block indentation.
:param prev_block: previous text block
:param block: current block to highlight | [
"Detects",
"fold",
"level",
"by",
"looking",
"at",
"the",
"block",
"indentation",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/utils/folding.py#L216-L236 | train | Detects fold level by looking at the indentation guide. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/editor/extensions/manager.py | EditorExtensionsManager.add | 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... | python | 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",
")",
":",
"logger",
".",
"debug",
"(",
"'adding extension {}'",
".",
"format",
"(",
"extension",
".",
"name",
")",
")",
"self",
".",
"_extensions",
"[",
"extension",
".",
"name",
"]",
"=",
"extension",
"extens... | Add a extension to the editor.
:param extension: The extension instance to add. | [
"Add",
"a",
"extension",
"to",
"the",
"editor",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/extensions/manager.py#L37-L47 | train | Adds an extension to the editor. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/editor/extensions/manager.py | EditorExtensionsManager.remove | 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... | python | 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",
")",
":",
"logger",
".",
"debug",
"(",
"'removing extension {}'",
".",
"format",
"(",
"name_or_klass",
")",
")",
"extension",
"=",
"self",
".",
"get",
"(",
"name_or_klass",
")",
"extension",
".",
"on_uninst... | Remove a extension from the editor.
:param name_or_klass: The name (or class) of the extension to remove.
:returns: The removed extension. | [
"Remove",
"a",
"extension",
"from",
"the",
"editor",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/extensions/manager.py#L49-L60 | train | Removes an extension from the editor. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/editor/extensions/manager.py | EditorExtensionsManager.clear | 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) | python | 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",
")",
":",
"while",
"len",
"(",
"self",
".",
"_extensions",
")",
":",
"key",
"=",
"sorted",
"(",
"list",
"(",
"self",
".",
"_extensions",
".",
"keys",
"(",
")",
")",
")",
"[",
"0",
"]",
"self",
".",
"remove",
"(",
"k... | Remove all extensions from the editor.
All extensions are removed fromlist and deleted. | [
"Remove",
"all",
"extensions",
"from",
"the",
"editor",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/extensions/manager.py#L62-L70 | train | Removes all extensions from the editor. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/editor/extensions/manager.py | EditorExtensionsManager.get | 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):
... | python | 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",
")",
":",
"if",
"not",
"isinstance",
"(",
"name_or_klass",
",",
"str",
")",
":",
"name_or_klass",
"=",
"name_or_klass",
".",
"__name__",
"return",
"self",
".",
"_extensions",
"[",
"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 | [
"Get",
"a",
"extension",
"by",
"name",
"(",
"or",
"class",
")",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/extensions/manager.py#L72-L82 | train | Get an extension by name or class. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/console/widgets/console.py | insert_text_to | 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... | python | 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",
")",
":",
"while",
"True",
":",
"index",
"=",
"text",
".",
"find",
"(",
"chr",
"(",
"8",
")",
")",
"# backspace",
"if",
"index",
"==",
"-",
"1",
":",
"break",
"cursor",
".",
"insertTe... | Helper to print text, taking into account backspaces | [
"Helper",
"to",
"print",
"text",
"taking",
"into",
"account",
"backspaces"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/console/widgets/console.py#L35-L45 | train | Helper to print text into a sequence of resources. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/console/widgets/console.py | QtANSIEscapeCodeHandler.set_color_scheme | 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):
... | python | 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",
")",
":",
"if",
"dark_color",
"(",
"foreground_color",
")",
":",
"self",
".",
"default_foreground_color",
"=",
"30",
"else",
":",
"self",
".",
"default_foreground_color",
"="... | Set color scheme (foreground and background). | [
"Set",
"color",
"scheme",
"(",
"foreground",
"and",
"background",
")",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/console/widgets/console.py#L54-L64 | train | Set color scheme. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/console/widgets/console.py | QtANSIEscapeCodeHandler.set_style | 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... | python | 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",
")",
":",
"if",
"self",
".",
"current_format",
"is",
"None",
":",
"assert",
"self",
".",
"base_format",
"is",
"not",
"None",
"self",
".",
"current_format",
"=",
"QTextCharFormat",
"(",
"self",
".",
"base_format",
")",
"# Fo... | Set font style with the following attributes:
'foreground_color', 'background_color', 'italic',
'bold' and 'underline' | [
"Set",
"font",
"style",
"with",
"the",
"following",
"attributes",
":",
"foreground_color",
"background_color",
"italic",
"bold",
"and",
"underline"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/console/widgets/console.py#L72-L115 | train | Set font style with the following attributes : foreground_color background_color italic bold and underline and underline. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/console/widgets/console.py | ConsoleBaseWidget.set_color_scheme | 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... | python | 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",
")",
":",
"self",
".",
"ansi_handler",
".",
"set_color_scheme",
"(",
"foreground_color",
",",
"background_color",
")",
"background_color",
"=",
"QColor",
"(",
"background_color",... | Set color scheme of the console (foreground and background). | [
"Set",
"color",
"scheme",
"of",
"the",
"console",
"(",
"foreground",
"and",
"background",
")",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/console/widgets/console.py#L202-L212 | train | Set color scheme of the console ( foreground and background. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/console/widgets/console.py | ConsoleBaseWidget.insert_text | 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) | python | 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",
")",
":",
"# Eventually this maybe should wrap to insert_text_to if",
"# backspace-handling is required",
"self",
".",
"textCursor",
"(",
")",
".",
"insertText",
"(",
"text",
",",
"self",
".",
"default_style",
".",
"form... | Reimplement TextEditBaseWidget method | [
"Reimplement",
"TextEditBaseWidget",
"method"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/console/widgets/console.py#L215-L219 | train | Reimplement TextEditBaseWidget method insert_text | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/console/widgets/console.py | ConsoleBaseWidget.paste | def paste(self):
"""Reimplement Qt method"""
if self.has_selected_text():
self.remove_selected_text()
self.insert_text(QApplication.clipboard().text()) | python | def paste(self):
"""Reimplement Qt method"""
if self.has_selected_text():
self.remove_selected_text()
self.insert_text(QApplication.clipboard().text()) | [
"def",
"paste",
"(",
"self",
")",
":",
"if",
"self",
".",
"has_selected_text",
"(",
")",
":",
"self",
".",
"remove_selected_text",
"(",
")",
"self",
".",
"insert_text",
"(",
"QApplication",
".",
"clipboard",
"(",
")",
".",
"text",
"(",
")",
")"
] | Reimplement Qt method | [
"Reimplement",
"Qt",
"method"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/console/widgets/console.py#L221-L225 | train | Reimplement Qt method paste | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/console/widgets/console.py | ConsoleBaseWidget.append_text_to_shell | 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... | python | 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",
")",
":",
"cursor",
"=",
"self",
".",
"textCursor",
"(",
")",
"cursor",
".",
"movePosition",
"(",
"QTextCursor",
".",
"End",
")",
"if",
"'\\r'",
"in",
"text",
":",
"#... | 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 | [
"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"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/console/widgets/console.py#L227-L289 | train | Append text to the Python shell. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/console/widgets/console.py | ConsoleBaseWidget.set_pythonshell_font | 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 | 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",
")",
":",
"if",
"font",
"is",
"None",
":",
"font",
"=",
"QFont",
"(",
")",
"for",
"style",
"in",
"self",
".",
"font_styles",
":",
"style",
".",
"apply_style",
"(",
"font",
"=",
"fo... | Python Shell only | [
"Python",
"Shell",
"only"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/console/widgets/console.py#L291-L298 | train | Python Shell only | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/pylint/plugin.py | Pylint.get_plugin_icon | def get_plugin_icon(self):
"""Return widget icon"""
path = osp.join(self.PLUGIN_PATH, self.IMG_PATH)
return ima.icon('pylint', icon_path=path) | python | 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",
")",
":",
"path",
"=",
"osp",
".",
"join",
"(",
"self",
".",
"PLUGIN_PATH",
",",
"self",
".",
"IMG_PATH",
")",
"return",
"ima",
".",
"icon",
"(",
"'pylint'",
",",
"icon_path",
"=",
"path",
")"
] | Return widget icon | [
"Return",
"widget",
"icon"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/pylint/plugin.py#L75-L78 | train | Return widget icon | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/pylint/plugin.py | Pylint.register_plugin | 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... | python | 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",
")",
":",
"self",
".",
"pylint",
".",
"treewidget",
".",
"sig_edit_goto",
".",
"connect",
"(",
"self",
".",
"main",
".",
"editor",
".",
"load",
")",
"self",
".",
"pylint",
".",
"redirect_stdio",
".",
"connect",
"(",... | Register plugin in Spyder's main window | [
"Register",
"plugin",
"in",
"Spyder",
"s",
"main",
"window"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/pylint/plugin.py#L96-L110 | train | Register plugin in Spyder s main window | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/pylint/plugin.py | Pylint.run_pylint | 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()) | python | 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",
")",
":",
"if",
"(",
"self",
".",
"get_option",
"(",
"'save_before'",
",",
"True",
")",
"and",
"not",
"self",
".",
"main",
".",
"editor",
".",
"save",
"(",
")",
")",
":",
"return",
"self",
".",
"switch_to_plugin",
"(... | Run pylint code analysis | [
"Run",
"pylint",
"code",
"analysis"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/pylint/plugin.py#L138-L144 | train | Run pylint code analysis | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/pylint/plugin.py | Pylint.analyze | 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) | python | 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",
")",
":",
"if",
"self",
".",
"dockwidget",
"and",
"not",
"self",
".",
"ismaximized",
":",
"self",
".",
"dockwidget",
".",
"setVisible",
"(",
"True",
")",
"self",
".",
"dockwidget",
".",
"setFocus",
"(",
"... | Reimplement analyze method | [
"Reimplement",
"analyze",
"method"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/pylint/plugin.py#L146-L152 | train | Reimplement analyze method | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/preferences/appearance.py | AppearanceConfigPage.set_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() | python | 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",
")",
":",
"# Update fonts in all plugins",
"set_font",
"(",
"font",
",",
"option",
"=",
"option",
")",
"plugins",
"=",
"self",
".",
"main",
".",
"widgetlist",
"+",
"self",
".",
"main",
".",
"thi... | Set global font used in Spyder. | [
"Set",
"global",
"font",
"used",
"in",
"Spyder",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/preferences/appearance.py#L182-L188 | train | Set global font used in Spyder. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/preferences/appearance.py | AppearanceConfigPage.update_qt_style_combobox | 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) | python | 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",
")",
":",
"if",
"is_dark_interface",
"(",
")",
":",
"self",
".",
"style_combobox",
".",
"setEnabled",
"(",
"False",
")",
"else",
":",
"self",
".",
"style_combobox",
".",
"setEnabled",
"(",
"True",
")"
] | Enable/disable the Qt style combobox. | [
"Enable",
"/",
"disable",
"the",
"Qt",
"style",
"combobox",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/preferences/appearance.py#L248-L253 | train | Enable or disable the Qt style combobox. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/preferences/appearance.py | AppearanceConfigPage.update_combobox | 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... | python | 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",
")",
":",
"index",
"=",
"self",
".",
"current_scheme_index",
"self",
".",
"schemes_combobox",
".",
"blockSignals",
"(",
"True",
")",
"names",
"=",
"self",
".",
"get_option",
"(",
"\"names\"",
")",
"try",
":",
"names",
... | Recreates the combobox contents. | [
"Recreates",
"the",
"combobox",
"contents",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/preferences/appearance.py#L255-L287 | train | Recreates the combobox contents. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/preferences/appearance.py | AppearanceConfigPage.update_buttons | 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... | python | 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",
")",
":",
"current_scheme",
"=",
"self",
".",
"current_scheme",
"names",
"=",
"self",
".",
"get_option",
"(",
"\"names\"",
")",
"try",
":",
"names",
".",
"pop",
"(",
"names",
".",
"index",
"(",
"u'Custom'",
")",
")",... | Updates the enable status of delete and reset buttons. | [
"Updates",
"the",
"enable",
"status",
"of",
"delete",
"and",
"reset",
"buttons",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/preferences/appearance.py#L289-L299 | train | Updates the enable status of delete and reset buttons. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/preferences/appearance.py | AppearanceConfigPage.update_preview | 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'
... | python | 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",
")",
":",
"text",
"=",
"(",
"'\"\"\"A string\"\"\"\\n\\n'",
"'# A comment\\n\\n'",
"'# %% A cell\\n\\n'",
"'class Foo(object):\\n'",
"' def __init__(self):\\n'",
"' ... | 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. | [
"Update",
"the",
"color",
"scheme",
"of",
"the",
"preview",
"editor",
"and",
"adds",
"text",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/preferences/appearance.py#L301-L330 | train | Update the color scheme of the preview editor and adds text. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/preferences/appearance.py | AppearanceConfigPage.create_new_scheme | 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... | python | 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",
")",
":",
"names",
"=",
"self",
".",
"get_option",
"(",
"'names'",
")",
"custom_names",
"=",
"self",
".",
"get_option",
"(",
"'custom_names'",
",",
"[",
"]",
")",
"# Get the available number this new color scheme",
"counter... | Creates a new color scheme with a custom name. | [
"Creates",
"a",
"new",
"color",
"scheme",
"with",
"a",
"custom",
"name",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/preferences/appearance.py#L334-L377 | train | Creates a new color scheme with a custom name. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/preferences/appearance.py | AppearanceConfigPage.edit_scheme | 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... | python | 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",
")",
":",
"dlg",
"=",
"self",
".",
"scheme_editor_dialog",
"dlg",
".",
"set_scheme",
"(",
"self",
".",
"current_scheme",
")",
"if",
"dlg",
".",
"exec_",
"(",
")",
":",
"# Update temp scheme to reflect instant edits on the preview... | Edit current scheme. | [
"Edit",
"current",
"scheme",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/preferences/appearance.py#L379-L391 | train | Edit current scheme. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/preferences/appearance.py | AppearanceConfigPage.delete_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?"),... | python | 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",
")",
":",
"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. | [
"Deletes",
"the",
"currently",
"selected",
"custom",
"color",
"scheme",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/preferences/appearance.py#L393-L422 | train | Deletes the currently selected custom color scheme. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/preferences/appearance.py | AppearanceConfigPage.reset_to_default | 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:
... | python | 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",
")",
":",
"# Checks that this is indeed a default scheme",
"scheme",
"=",
"self",
".",
"current_scheme",
"names",
"=",
"self",
".",
"get_option",
"(",
"'names'",
")",
"if",
"scheme",
"in",
"names",
":",
"for",
"key",
"in",... | Restore initial values for default color schemes. | [
"Restore",
"initial",
"values",
"for",
"default",
"color",
"schemes",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/preferences/appearance.py#L432-L443 | train | Restore initial values for default color schemes. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/preferences/appearance.py | SchemeEditor.set_scheme | 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 | python | 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",
")",
":",
"self",
".",
"stack",
".",
"setCurrentIndex",
"(",
"self",
".",
"order",
".",
"index",
"(",
"scheme_name",
")",
")",
"self",
".",
"last_used_scheme",
"=",
"scheme_name"
] | Set the current stack by 'scheme_name'. | [
"Set",
"the",
"current",
"stack",
"by",
"scheme_name",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/preferences/appearance.py#L476-L479 | train | Set the current stack by scheme_name. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/preferences/appearance.py | SchemeEditor.get_edited_color_scheme | 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]:
... | python | 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",
")",
":",
"color_scheme",
"=",
"{",
"}",
"scheme_name",
"=",
"self",
".",
"last_used_scheme",
"for",
"key",
"in",
"self",
".",
"widgets",
"[",
"scheme_name",
"]",
":",
"items",
"=",
"self",
".",
"widgets",
"["... | Get the values of the last edited color scheme to be used in an instant
preview in the preview editor, without using `apply`. | [
"Get",
"the",
"values",
"of",
"the",
"last",
"edited",
"color",
"scheme",
"to",
"be",
"used",
"in",
"an",
"instant",
"preview",
"in",
"the",
"preview",
"editor",
"without",
"using",
"apply",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/preferences/appearance.py#L488-L509 | train | Get the values of the last edited color scheme. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/preferences/appearance.py | SchemeEditor.add_color_scheme_stack | 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", ]),
... | python | 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",
")",
":",
"color_scheme_groups",
"=",
"[",
"(",
"_",
"(",
"'Text'",
")",
",",
"[",
"\"normal\"",
",",
"\"comment\"",
",",
"\"string\"",
",",
"\"number\"",
",",
"... | Add a stack for a given scheme and connects the CONF values. | [
"Add",
"a",
"stack",
"for",
"a",
"given",
"scheme",
"and",
"connects",
"the",
"CONF",
"values",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/preferences/appearance.py#L513-L601 | train | Add a stack for a given scheme and connects the CONF values. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/preferences/appearance.py | SchemeEditor.delete_color_scheme_stack | 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) | python | 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",
")",
":",
"self",
".",
"set_scheme",
"(",
"scheme_name",
")",
"widget",
"=",
"self",
".",
"stack",
".",
"currentWidget",
"(",
")",
"self",
".",
"stack",
".",
"removeWidget",
"(",
"widget",
... | Remove stack widget by 'scheme_name'. | [
"Remove",
"stack",
"widget",
"by",
"scheme_name",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/preferences/appearance.py#L603-L609 | train | Remove stack widget by scheme_name. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/projects/plugin.py | Projects.get_plugin_actions | 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... | python | 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",
")",
":",
"self",
".",
"new_project_action",
"=",
"create_action",
"(",
"self",
",",
"_",
"(",
"\"New Project...\"",
")",
",",
"triggered",
"=",
"self",
".",
"create_new_project",
")",
"self",
".",
"open_project_action",... | Return a list of actions related to plugin | [
"Return",
"a",
"list",
"of",
"actions",
"related",
"to",
"plugin"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/projects/plugin.py#L80-L113 | train | Returns a list of actions related to the plugin | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/projects/plugin.py | Projects.register_plugin | 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)
... | python | 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",
")",
":",
"ipyconsole",
"=",
"self",
".",
"main",
".",
"ipyconsole",
"treewidget",
"=",
"self",
".",
"explorer",
".",
"treewidget",
"lspmgr",
"=",
"self",
".",
"main",
".",
"lspmanager",
"self",
".",
"main",
".",
"a... | Register plugin in Spyder's main window | [
"Register",
"plugin",
"in",
"Spyder",
"s",
"main",
"window"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/projects/plugin.py#L115-L166 | train | Register plugin in Spyder s main window | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/projects/plugin.py | Projects.closing_plugin | def closing_plugin(self, cancelable=False):
"""Perform actions before parent main window is closed"""
self.save_config()
self.explorer.closing_widget()
return True | python | 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",
")",
":",
"self",
".",
"save_config",
"(",
")",
"self",
".",
"explorer",
".",
"closing_widget",
"(",
")",
"return",
"True"
] | Perform actions before parent main window is closed | [
"Perform",
"actions",
"before",
"parent",
"main",
"window",
"is",
"closed"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/projects/plugin.py#L172-L176 | train | Perform actions before parent main window is closed | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/projects/plugin.py | Projects.switch_to_plugin | 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()
... | python | 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",
")",
":",
"# Unmaxizime currently maximized plugin\r",
"if",
"(",
"self",
".",
"main",
".",
"last_plugin",
"is",
"not",
"None",
"and",
"self",
".",
"main",
".",
"last_plugin",
".",
"ismaximized",
"and",
"self",
".",
"mai... | Switch to plugin. | [
"Switch",
"to",
"plugin",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/projects/plugin.py#L178-L190 | train | Switch to plugin. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/projects/plugin.py | Projects.setup_menu_actions | 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):
... | python | 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",
")",
":",
"self",
".",
"recent_project_menu",
".",
"clear",
"(",
")",
"self",
".",
"recent_projects_actions",
"=",
"[",
"]",
"if",
"self",
".",
"recent_projects",
":",
"for",
"project",
"in",
"self",
".",
"recent_pro... | Setup and update the menu actions. | [
"Setup",
"and",
"update",
"the",
"menu",
"actions",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/projects/plugin.py#L193-L216 | train | Setup and update the menu actions. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/projects/plugin.py | Projects.update_project_actions | 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())
... | python | 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",
")",
":",
"if",
"self",
".",
"recent_projects",
":",
"self",
".",
"clear_recent_projects_action",
".",
"setEnabled",
"(",
"True",
")",
"else",
":",
"self",
".",
"clear_recent_projects_action",
".",
"setEnabled",
"(",
... | Update actions of the Projects menu | [
"Update",
"actions",
"of",
"the",
"Projects",
"menu"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/projects/plugin.py#L218-L228 | train | Update actions of the Projects menu | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/projects/plugin.py | Projects.edit_project_preferences | 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)
# ... | python | 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",
")",
":",
"from",
"spyder",
".",
"plugins",
".",
"projects",
".",
"confpage",
"import",
"ProjectPreferences",
"if",
"self",
".",
"project_active",
":",
"active_project",
"=",
"self",
".",
"project_list",
"[",
"0",
... | Edit Spyder active project preferences | [
"Edit",
"Spyder",
"active",
"project",
"preferences"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/projects/plugin.py#L230-L242 | train | Edit Spyder active project preferences | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/projects/plugin.py | Projects.create_new_project | 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... | python | 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",
")",
":",
"self",
".",
"switch_to_plugin",
"(",
")",
"active_project",
"=",
"self",
".",
"current_active_project",
"dlg",
"=",
"ProjectDialog",
"(",
"self",
")",
"dlg",
".",
"sig_project_creation_requested",
".",
"connect"... | Create new project | [
"Create",
"new",
"project"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/projects/plugin.py#L245-L257 | train | Create new project | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/projects/plugin.py | Projects._create_project | def _create_project(self, path):
"""Create a new project."""
self.open_project(path=path)
self.setup_menu_actions()
self.add_to_recent(path) | python | 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",
")",
":",
"self",
".",
"open_project",
"(",
"path",
"=",
"path",
")",
"self",
".",
"setup_menu_actions",
"(",
")",
"self",
".",
"add_to_recent",
"(",
"path",
")"
] | Create a new project. | [
"Create",
"a",
"new",
"project",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/projects/plugin.py#L259-L263 | train | Create a new project. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/projects/plugin.py | Projects.open_project | 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,
... | python | 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",
")",
":",
"self",
".",
"switch_to_plugin",
"(",
")",
"if",
"path",
"is",
"None",
":",
"basedir",
"=",
"get_home_dir... | Open the project located in `path` | [
"Open",
"the",
"project",
"located",
"in",
"path"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/projects/plugin.py#L265-L309 | train | Open the project located in path. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/projects/plugin.py | Projects.close_project | 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(
... | python | 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",
")",
":",
"if",
"self",
".",
"current_active_project",
":",
"self",
".",
"switch_to_plugin",
"(",
")",
"if",
"self",
".",
"main",
".",
"editor",
"is",
"not",
"None",
":",
"self",
".",
"set_project_filenames",
"(",
"self... | Close current project and return to a window without an active
project | [
"Close",
"current",
"project",
"and",
"return",
"to",
"a",
"window",
"without",
"an",
"active",
"project"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/projects/plugin.py#L311-L335 | train | Close current project and return to a window without an active project | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/projects/plugin.py | Projects.delete_project | 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... | python | 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",
")",
":",
"if",
"self",
".",
"current_active_project",
":",
"self",
".",
"switch_to_plugin",
"(",
")",
"path",
"=",
"self",
".",
"current_active_project",
".",
"root_path",
"buttons",
"=",
"QMessageBox",
".",
"Yes",
"|",
... | Delete the current project without deleting the files in the directory. | [
"Delete",
"the",
"current",
"project",
"without",
"deleting",
"the",
"files",
"in",
"the",
"directory",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/projects/plugin.py#L337-L363 | train | Delete the current project without deleting the files in the directory. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/projects/plugin.py | Projects.reopen_last_project | 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!... | python | 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",
")",
":",
"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",
"."... | Reopen the active project when Spyder was closed last time, if any | [
"Reopen",
"the",
"active",
"project",
"when",
"Spyder",
"was",
"closed",
"last",
"time",
"if",
"any"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/projects/plugin.py#L374-L387 | train | Reopen the active project when Spyder was closed last time. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/projects/plugin.py | Projects.get_project_filenames | 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.... | python | 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",
")",
":",
"recent_files",
"=",
"[",
"]",
"if",
"self",
".",
"current_active_project",
":",
"recent_files",
"=",
"self",
".",
"current_active_project",
".",
"get_recent_files",
"(",
")",
"elif",
"self",
".",
"latest_pr... | Get the list of recent filenames of a project | [
"Get",
"the",
"list",
"of",
"recent",
"filenames",
"of",
"a",
"project"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/projects/plugin.py#L389-L396 | train | Get the list of recent filenames of a project | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/projects/plugin.py | Projects.set_project_filenames | 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... | python | 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",
")",
":",
"if",
"(",
"self",
".",
"current_active_project",
"and",
"self",
".",
"is_valid_project",
"(",
"self",
".",
"current_active_project",
".",
"root_path",
")",
")",
":",
"self",
".",
"cur... | Set the list of open file names in a project | [
"Set",
"the",
"list",
"of",
"open",
"file",
"names",
"in",
"a",
"project"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/projects/plugin.py#L398-L403 | train | Set the list of open file names in a project | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/projects/plugin.py | Projects.get_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 | python | 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",
")",
":",
"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 | [
"Get",
"path",
"of",
"the",
"active",
"project"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/projects/plugin.py#L405-L410 | train | Get path of the active project | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/projects/plugin.py | Projects.get_pythonpath | 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... | python | 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",
")",
":",
"if",
"at_start",
":",
"current_path",
"=",
"self",
".",
"get_option",
"(",
"'current_project_path'",
",",
"default",
"=",
"None",
")",
"else",
":",
"current_path",
"=",
"self",
... | Get project path as a list to be added to PYTHONPATH | [
"Get",
"project",
"path",
"as",
"a",
"list",
"to",
"be",
"added",
"to",
"PYTHONPATH"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/projects/plugin.py#L412-L422 | train | Get project path as a list to be added to PYTHONPATH | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/projects/plugin.py | Projects.save_config | 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',
... | python | 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",
")",
":",
"self",
".",
"set_option",
"(",
"'recent_projects'",
",",
"self",
".",
"recent_projects",
")",
"self",
".",
"set_option",
"(",
"'expanded_state'",
",",
"self",
".",
"explorer",
".",
"treewidget",
".",
"get_expanded_... | Save configuration: opened projects & tree widget state.
Also save whether dock widget is visible if a project is open. | [
"Save",
"configuration",
":",
"opened",
"projects",
"&",
"tree",
"widget",
"state",
".",
"Also",
"save",
"whether",
"dock",
"widget",
"is",
"visible",
"if",
"a",
"project",
"is",
"open",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/projects/plugin.py#L429-L442 | train | Save the configuration of the current active project. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/projects/plugin.py | Projects.show_explorer | 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() | python | 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",
")",
":",
"if",
"self",
".",
"dockwidget",
"is",
"not",
"None",
":",
"if",
"self",
".",
"dockwidget",
".",
"isHidden",
"(",
")",
":",
"self",
".",
"dockwidget",
".",
"show",
"(",
")",
"self",
".",
"dockwidget",
".... | Show the explorer | [
"Show",
"the",
"explorer"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/projects/plugin.py#L465-L471 | train | Show the explorer | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/projects/plugin.py | Projects.is_valid_project | 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 | python | 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",
")",
":",
"spy_project_dir",
"=",
"osp",
".",
"join",
"(",
"path",
",",
"'.spyproject'",
")",
"if",
"osp",
".",
"isdir",
"(",
"path",
")",
"and",
"osp",
".",
"isdir",
"(",
"spy_project_dir",
")",
":"... | Check if a directory is a valid Spyder project | [
"Check",
"if",
"a",
"directory",
"is",
"a",
"valid",
"Spyder",
"project"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/projects/plugin.py#L478-L484 | train | Check if a directory is a valid Spyder project | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/projects/plugin.py | Projects.add_to_recent | 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... | python | 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",
")",
":",
"if",
"project",
"not",
"in",
"self",
".",
"recent_projects",
":",
"self",
".",
"recent_projects",
".",
"insert",
"(",
"0",
",",
"project",
")",
"self",
".",
"recent_projects",
"=",
"self",
"... | Add an entry to recent projetcs
We only maintain the list of the 10 most recent projects | [
"Add",
"an",
"entry",
"to",
"recent",
"projetcs",
"We",
"only",
"maintain",
"the",
"list",
"of",
"the",
"10",
"most",
"recent",
"projects"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/projects/plugin.py#L486-L494 | train | Add an entry to recent projects | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/utils/windows.py | set_attached_console_visible | 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])) | python | 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",
")",
":",
"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 | [
"Show",
"/",
"hide",
"system",
"console",
"window",
"attached",
"to",
"current",
"process",
".",
"Return",
"it",
"s",
"previous",
"state",
".",
"Availability",
":",
"Windows"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/utils/windows.py#L27-L33 | train | Show or hide system console window attached to current process. Returns it s previous state. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/config/gui.py | get_family | 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... | python | 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",
")",
":",
"if",
"not",
"isinstance",
"(",
"families",
",",
"list",
")",
":",
"families",
"=",
"[",
"families",
"]",
"for",
"family",
"in",
"families",
":",
"if",
"font_is_installed",
"(",
"family",
")",
":",
"return"... | Return the first installed font family in family list | [
"Return",
"the",
"first",
"installed",
"font",
"family",
"in",
"family",
"list"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/config/gui.py#L45-L54 | train | Return the first installed font family in family list | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/config/gui.py | get_font | 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... | python | 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",
")",
":",
"font",
"=",
"FONT_CACHE",
".",
"get",
"(",
"(",
"section",
",",
"option",
")",
")",
"if",
"font",
"is",
"None",
":",
"f... | Get console font properties depending on OS and user options | [
"Get",
"console",
"font",
"properties",
"depending",
"on",
"OS",
"and",
"user",
"options"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/config/gui.py#L59-L83 | train | Get console font properties depending on OS and user options | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/config/gui.py | set_font | 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... | python | 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'",
")",
":",
"CONF",
".",
"set",
"(",
"section",
",",
"option",
"+",
"'/family'",
",",
"to_text_string",
"(",
"font",
".",
"family",
"(",
")",
")",
")",
"... | Set font | [
"Set",
"font"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/config/gui.py#L86-L92 | train | Set font in the specified section | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/config/gui.py | fixed_shortcut | 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 | python | 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",
")",
":",
"sc",
"=",
"QShortcut",
"(",
"QKeySequence",
"(",
"keystr",
")",
",",
"parent",
",",
"action",
")",
"sc",
".",
"setContext",
"(",
"Qt",
".",
"WidgetWithChildrenShortcut",
")",
... | DEPRECATED: This function will be removed in Spyder 4.0
Define a fixed shortcut according to a keysequence string | [
"DEPRECATED",
":",
"This",
"function",
"will",
"be",
"removed",
"in",
"Spyder",
"4",
".",
"0"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/config/gui.py#L105-L113 | train | Define a fixed shortcut according to a keysequence string | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/config/gui.py | config_shortcut | 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.... | python | 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",
")",
":",
"keystr",
"=",
"get_shortcut",
"(",
"context",
",",
"name",
")",
"qsc",
"=",
"QShortcut",
"(",
"QKeySequence",
"(",
"keystr",
")",
",",
"parent",
",",
"action"... | Create a Shortcut namedtuple for a widget
The data contained in this tuple will be registered in
our shortcuts preferences page | [
"Create",
"a",
"Shortcut",
"namedtuple",
"for",
"a",
"widget",
"The",
"data",
"contained",
"in",
"this",
"tuple",
"will",
"be",
"registered",
"in",
"our",
"shortcuts",
"preferences",
"page"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/config/gui.py#L116-L127 | train | Create a Shortcut namedtuple for a widget
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/config/gui.py | iter_shortcuts | 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 | python | 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",
"(",
")",
":",
"for",
"context_name",
",",
"keystr",
"in",
"CONF",
".",
"items",
"(",
"'shortcuts'",
")",
":",
"context",
",",
"name",
"=",
"context_name",
".",
"split",
"(",
"\"/\"",
",",
"1",
")",
"yield",
"context",
",",
"na... | Iterate over keyboard shortcuts. | [
"Iterate",
"over",
"keyboard",
"shortcuts",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/config/gui.py#L130-L134 | train | Iterate over keyboard shortcuts. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/config/gui.py | get_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 | python | 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",
")",
":",
"color_scheme",
"=",
"{",
"}",
"for",
"key",
"in",
"sh",
".",
"COLOR_SCHEME_KEYS",
":",
"color_scheme",
"[",
"key",
"]",
"=",
"CONF",
".",
"get",
"(",
"\"appearance\"",
",",
"\"%s/%s\"",
"%",
"(",
"name",... | Get syntax color scheme | [
"Get",
"syntax",
"color",
"scheme"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/config/gui.py#L142-L147 | train | Get syntax color scheme | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/config/gui.py | set_color_scheme | 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... | python | 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",
")",
":",
"section",
"=",
"\"appearance\"",
"names",
"=",
"CONF",
".",
"get",
"(",
"\"appearance\"",
",",
"\"names\"",
",",
"[",
"]",
")",
"for",
"key",
"in",
"sh",... | Set syntax color scheme | [
"Set",
"syntax",
"color",
"scheme"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/config/gui.py#L150-L160 | train | Set syntax color scheme for a single resource. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/config/gui.py | set_default_color_scheme | 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) | python | 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",
")",
":",
"assert",
"name",
"in",
"sh",
".",
"COLOR_SCHEME_NAMES",
"set_color_scheme",
"(",
"name",
",",
"sh",
".",
"get_color_scheme",
"(",
"name",
")",
",",
"replace",
"=",
"repla... | Reset color scheme to default values | [
"Reset",
"color",
"scheme",
"to",
"default",
"values"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/config/gui.py#L163-L166 | train | Reset color scheme to default values | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/config/gui.py | is_dark_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) | python | 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",
")",
":",
"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. | [
"Check",
"if",
"the",
"font",
"color",
"used",
"in",
"the",
"color",
"scheme",
"is",
"dark",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/config/gui.py#L169-L173 | train | Check if the font color used in the color scheme is dark. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/widgets/dock.py | TabFilter.eventFilter | 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... | python | 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",
")",
":",
"event_type",
"=",
"event",
".",
"type",
"(",
")",
"if",
"event_type",
"==",
"QEvent",
".",
"MouseButtonPress",
":",
"self",
".",
"tab_pressed",
"(",
"event",
")",
"return",
"False",
... | Filter mouse press events.
Events that are captured and not propagated return True. Events that
are not captured and are propagated return False. | [
"Filter",
"mouse",
"press",
"events",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/widgets/dock.py#L32-L42 | train | Filter mouse press events. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/widgets/dock.py | TabFilter.tab_pressed | 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:
... | python | 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",
")",
":",
"self",
".",
"from_index",
"=",
"self",
".",
"dock_tabbar",
".",
"tabAt",
"(",
"event",
".",
"pos",
"(",
")",
")",
"self",
".",
"dock_tabbar",
".",
"setCurrentIndex",
"(",
"self",
".",
"from_in... | Method called when a tab from a QTabBar has been pressed. | [
"Method",
"called",
"when",
"a",
"tab",
"from",
"a",
"QTabBar",
"has",
"been",
"pressed",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/widgets/dock.py#L44-L53 | train | Method called when a tab from a QTabBar has been pressed. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/widgets/dock.py | TabFilter.show_nontab_menu | 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())) | python | 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",
")",
":",
"menu",
"=",
"self",
".",
"main",
".",
"createPopupMenu",
"(",
")",
"menu",
".",
"exec_",
"(",
"self",
".",
"dock_tabbar",
".",
"mapToGlobal",
"(",
"event",
".",
"pos",
"(",
")",
")",
")... | Show the context menu assigned to nontabs section. | [
"Show",
"the",
"context",
"menu",
"assigned",
"to",
"nontabs",
"section",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/widgets/dock.py#L59-L62 | train | Show the context menu assigned to nontabs section. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/widgets/dock.py | SpyderDockWidget.install_tab_event_filter | 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... | python | 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",
")",
":",
"dock_tabbar",
"=",
"None",
"tabbars",
"=",
"self",
".",
"main",
".",
"findChildren",
"(",
"QTabBar",
")",
"for",
"tabbar",
"in",
"tabbars",
":",
"for",
"tab",
"in",
"range",
"(",
"t... | Install an event filter to capture mouse events in the tabs of a
QTabBar holding tabified dockwidgets. | [
"Install",
"an",
"event",
"filter",
"to",
"capture",
"mouse",
"events",
"in",
"the",
"tabs",
"of",
"a",
"QTabBar",
"holding",
"tabified",
"dockwidgets",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/widgets/dock.py#L208-L227 | train | Install an event filter to capture mouse events in the tabs of the dockwidgets. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/editor/utils/bookmarks.py | _load_all_bookmarks | 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 | python | 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",
"(",
")",
":",
"slots",
"=",
"CONF",
".",
"get",
"(",
"'editor'",
",",
"'bookmarks'",
",",
"{",
"}",
")",
"for",
"slot_num",
"in",
"list",
"(",
"slots",
".",
"keys",
"(",
")",
")",
":",
"if",
"not",
"osp",
".",
"isfile... | Load all bookmarks from config. | [
"Load",
"all",
"bookmarks",
"from",
"config",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/utils/bookmarks.py#L17-L23 | train | Load all bookmarks from config. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/editor/utils/bookmarks.py | load_bookmarks | 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} | python | 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",
")",
":",
"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. | [
"Load",
"all",
"bookmarks",
"for",
"a",
"specific",
"file",
"from",
"config",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/utils/bookmarks.py#L26-L29 | train | Load all bookmarks for a specific file from config. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/editor/utils/bookmarks.py | load_bookmarks_without_file | 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} | python | 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",
")",
":",
"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. | [
"Load",
"all",
"bookmarks",
"but",
"those",
"from",
"a",
"specific",
"file",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/utils/bookmarks.py#L32-L35 | train | Load all bookmarks but those from a specific file. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/editor/utils/bookmarks.py | save_bookmarks | 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(... | python | 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",
")",
":",
"if",
"not",
"osp",
".",
"isfile",
"(",
"filename",
")",
":",
"return",
"slots",
"=",
"load_bookmarks_without_file",
"(",
"filename",
")",
"for",
"slot_num",
",",
"content",
"in",
"bookmar... | Save all bookmarks from specific file to config. | [
"Save",
"all",
"bookmarks",
"from",
"specific",
"file",
"to",
"config",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/utils/bookmarks.py#L38-L45 | train | Save all bookmarks from specific file to config. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/editor/plugin.py | Editor.report_open_file | 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... | python | 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",
")",
":",
"filename",
"=",
"options",
"[",
"'filename'",
"]",
"logger",
".",
"debug",
"(",
"'Call LSP for %s'",
"%",
"filename",
")",
"language",
"=",
"options",
"[",
"'language'",
"]",
"callback",
"=",... | Request to start a LSP server to attend a language. | [
"Request",
"to",
"start",
"a",
"LSP",
"server",
"to",
"attend",
"a",
"language",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L275-L291 | train | Request to start a LSP server to attend a language. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/editor/plugin.py | Editor.register_lsp_server_settings | 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... | python | 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",
")",
":",
"self",
".",
"lsp_editor_settings",
"[",
"language",
"]",
"=",
"settings",
"logger",
".",
"debug",
"(",
"'LSP server settings for {!s} are: {!r}'",
".",
"format",
"(",
... | Register LSP server settings. | [
"Register",
"LSP",
"server",
"settings",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L294-L299 | train | Register LSP server settings. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/editor/plugin.py | Editor.lsp_server_ready | def lsp_server_ready(self, language, configuration):
"""Notify all stackeditors about LSP server availability."""
for editorstack in self.editorstacks:
editorstack.notify_server_ready(language, configuration) | python | def lsp_server_ready(self, language, configuration):
"""Notify all stackeditors about LSP server availability."""
for editorstack in self.editorstacks:
editorstack.notify_server_ready(language, configuration) | [
"def",
"lsp_server_ready",
"(",
"self",
",",
"language",
",",
"configuration",
")",
":",
"for",
"editorstack",
"in",
"self",
".",
"editorstacks",
":",
"editorstack",
".",
"notify_server_ready",
"(",
"language",
",",
"configuration",
")"
] | Notify all stackeditors about LSP server availability. | [
"Notify",
"all",
"stackeditors",
"about",
"LSP",
"server",
"availability",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L301-L304 | train | Notify all stackeditors about LSP server availability. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/editor/plugin.py | Editor.visibility_changed | def visibility_changed(self, enable):
"""DockWidget visibility has changed"""
SpyderPluginWidget.visibility_changed(self, enable)
if self.dockwidget is None:
return
if self.dockwidget.isWindow():
self.dock_toolbar.show()
else:
self.dock... | python | def visibility_changed(self, enable):
"""DockWidget visibility has changed"""
SpyderPluginWidget.visibility_changed(self, enable)
if self.dockwidget is None:
return
if self.dockwidget.isWindow():
self.dock_toolbar.show()
else:
self.dock... | [
"def",
"visibility_changed",
"(",
"self",
",",
"enable",
")",
":",
"SpyderPluginWidget",
".",
"visibility_changed",
"(",
"self",
",",
"enable",
")",
"if",
"self",
".",
"dockwidget",
"is",
"None",
":",
"return",
"if",
"self",
".",
"dockwidget",
".",
"isWindow... | DockWidget visibility has changed | [
"DockWidget",
"visibility",
"has",
"changed"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L329-L340 | train | Called when the visibility of dockwidget has changed. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/editor/plugin.py | Editor.closing_plugin | def closing_plugin(self, cancelable=False):
"""Perform actions before parent main window is closed"""
state = self.splitter.saveState()
self.set_option('splitter_state', qbytearray_to_str(state))
filenames = []
editorstack = self.editorstacks[0]
active_project_pat... | python | def closing_plugin(self, cancelable=False):
"""Perform actions before parent main window is closed"""
state = self.splitter.saveState()
self.set_option('splitter_state', qbytearray_to_str(state))
filenames = []
editorstack = self.editorstacks[0]
active_project_pat... | [
"def",
"closing_plugin",
"(",
"self",
",",
"cancelable",
"=",
"False",
")",
":",
"state",
"=",
"self",
".",
"splitter",
".",
"saveState",
"(",
")",
"self",
".",
"set_option",
"(",
"'splitter_state'",
",",
"qbytearray_to_str",
"(",
"state",
")",
")",
"filen... | Perform actions before parent main window is closed | [
"Perform",
"actions",
"before",
"parent",
"main",
"window",
"is",
"closed"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L348-L382 | train | Perform actions before parent main window is closed | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/editor/plugin.py | Editor.get_plugin_actions | def get_plugin_actions(self):
"""Return a list of actions related to plugin"""
# ---- File menu and toolbar ----
self.new_action = create_action(
self,
_("&New file..."),
icon=ima.icon('filenew'), tip=_("New file"),
triggered... | python | def get_plugin_actions(self):
"""Return a list of actions related to plugin"""
# ---- File menu and toolbar ----
self.new_action = create_action(
self,
_("&New file..."),
icon=ima.icon('filenew'), tip=_("New file"),
triggered... | [
"def",
"get_plugin_actions",
"(",
"self",
")",
":",
"# ---- File menu and toolbar ----\r",
"self",
".",
"new_action",
"=",
"create_action",
"(",
"self",
",",
"_",
"(",
"\"&New file...\"",
")",
",",
"icon",
"=",
"ima",
".",
"icon",
"(",
"'filenew'",
")",
",",
... | Return a list of actions related to plugin | [
"Return",
"a",
"list",
"of",
"actions",
"related",
"to",
"plugin"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L384-L944 | train | Return a list of actions related to the plugin | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/editor/plugin.py | Editor.register_plugin | def register_plugin(self):
"""Register plugin in Spyder's main window"""
self.main.restore_scrollbar_position.connect(
self.restore_scrollbar_position)
self.main.console.edit_goto.connect(self.load)
self.exec_in_extconsole.connect(self.main.execute_in_external_console)
... | python | def register_plugin(self):
"""Register plugin in Spyder's main window"""
self.main.restore_scrollbar_position.connect(
self.restore_scrollbar_position)
self.main.console.edit_goto.connect(self.load)
self.exec_in_extconsole.connect(self.main.execute_in_external_console)
... | [
"def",
"register_plugin",
"(",
"self",
")",
":",
"self",
".",
"main",
".",
"restore_scrollbar_position",
".",
"connect",
"(",
"self",
".",
"restore_scrollbar_position",
")",
"self",
".",
"main",
".",
"console",
".",
"edit_goto",
".",
"connect",
"(",
"self",
... | Register plugin in Spyder's main window | [
"Register",
"plugin",
"in",
"Spyder",
"s",
"main",
"window"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L946-L962 | train | Register plugin in Spyder s main window | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/editor/plugin.py | Editor.update_font | def update_font(self):
"""Update font from Preferences"""
font = self.get_plugin_font()
color_scheme = self.get_color_scheme()
for editorstack in self.editorstacks:
editorstack.set_default_font(font, color_scheme)
completion_size = CONF.get('main', 'completi... | python | def update_font(self):
"""Update font from Preferences"""
font = self.get_plugin_font()
color_scheme = self.get_color_scheme()
for editorstack in self.editorstacks:
editorstack.set_default_font(font, color_scheme)
completion_size = CONF.get('main', 'completi... | [
"def",
"update_font",
"(",
"self",
")",
":",
"font",
"=",
"self",
".",
"get_plugin_font",
"(",
")",
"color_scheme",
"=",
"self",
".",
"get_color_scheme",
"(",
")",
"for",
"editorstack",
"in",
"self",
".",
"editorstacks",
":",
"editorstack",
".",
"set_default... | Update font from Preferences | [
"Update",
"font",
"from",
"Preferences"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L964-L973 | train | Update font from Preferences | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/editor/plugin.py | Editor._create_checkable_action | def _create_checkable_action(self, text, conf_name, editorstack_method):
"""Helper function to create a checkable action.
Args:
text (str): Text to be displayed in the action.
conf_name (str): configuration setting associated with the action
editorstack_method ... | python | def _create_checkable_action(self, text, conf_name, editorstack_method):
"""Helper function to create a checkable action.
Args:
text (str): Text to be displayed in the action.
conf_name (str): configuration setting associated with the action
editorstack_method ... | [
"def",
"_create_checkable_action",
"(",
"self",
",",
"text",
",",
"conf_name",
",",
"editorstack_method",
")",
":",
"def",
"toogle",
"(",
"checked",
")",
":",
"self",
".",
"switch_to_plugin",
"(",
")",
"self",
".",
"_toggle_checkable_action",
"(",
"checked",
"... | Helper function to create a checkable action.
Args:
text (str): Text to be displayed in the action.
conf_name (str): configuration setting associated with the action
editorstack_method (str): name of EditorStack class that will be
used to update the cha... | [
"Helper",
"function",
"to",
"create",
"a",
"checkable",
"action",
".",
"Args",
":",
"text",
"(",
"str",
")",
":",
"Text",
"to",
"be",
"displayed",
"in",
"the",
"action",
".",
"conf_name",
"(",
"str",
")",
":",
"configuration",
"setting",
"associated",
"w... | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L975-L990 | train | Helper function to create a checkable action. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/editor/plugin.py | Editor._toggle_checkable_action | def _toggle_checkable_action(self, checked, editorstack_method, conf_name):
"""Handle the toogle of a checkable action.
Update editorstacks and the configuration.
Args:
checked (bool): State of the action.
editorstack_method (str): name of EditorStack class that ... | python | def _toggle_checkable_action(self, checked, editorstack_method, conf_name):
"""Handle the toogle of a checkable action.
Update editorstacks and the configuration.
Args:
checked (bool): State of the action.
editorstack_method (str): name of EditorStack class that ... | [
"def",
"_toggle_checkable_action",
"(",
"self",
",",
"checked",
",",
"editorstack_method",
",",
"conf_name",
")",
":",
"if",
"self",
".",
"editorstacks",
":",
"for",
"editorstack",
"in",
"self",
".",
"editorstacks",
":",
"try",
":",
"editorstack",
".",
"__geta... | Handle the toogle of a checkable action.
Update editorstacks and the configuration.
Args:
checked (bool): State of the action.
editorstack_method (str): name of EditorStack class that will be
used to update the changes in each editorstack.
co... | [
"Handle",
"the",
"toogle",
"of",
"a",
"checkable",
"action",
".",
"Update",
"editorstacks",
"and",
"the",
"configuration",
".",
"Args",
":",
"checked",
"(",
"bool",
")",
":",
"State",
"of",
"the",
"action",
".",
"editorstack_method",
"(",
"str",
")",
":",
... | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L993-L1018 | train | Handles the toogle of a checkable action. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/editor/plugin.py | Editor.received_sig_option_changed | def received_sig_option_changed(self, option, value):
"""
Called when sig_option_changed is received.
If option being changed is autosave_mapping, then synchronize new
mapping with all editor stacks except the sender.
"""
if option == 'autosave_mapping':
... | python | def received_sig_option_changed(self, option, value):
"""
Called when sig_option_changed is received.
If option being changed is autosave_mapping, then synchronize new
mapping with all editor stacks except the sender.
"""
if option == 'autosave_mapping':
... | [
"def",
"received_sig_option_changed",
"(",
"self",
",",
"option",
",",
"value",
")",
":",
"if",
"option",
"==",
"'autosave_mapping'",
":",
"for",
"editorstack",
"in",
"self",
".",
"editorstacks",
":",
"if",
"editorstack",
"!=",
"self",
".",
"sender",
"(",
")... | Called when sig_option_changed is received.
If option being changed is autosave_mapping, then synchronize new
mapping with all editor stacks except the sender. | [
"Called",
"when",
"sig_option_changed",
"is",
"received",
".",
"If",
"option",
"being",
"changed",
"is",
"autosave_mapping",
"then",
"synchronize",
"new",
"mapping",
"with",
"all",
"editor",
"stacks",
"except",
"the",
"sender",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L1020-L1031 | train | Called when a signal is received when an option being changed. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/editor/plugin.py | Editor.unregister_editorstack | def unregister_editorstack(self, editorstack):
"""Removing editorstack only if it's not the last remaining"""
self.remove_last_focus_editorstack(editorstack)
if len(self.editorstacks) > 1:
index = self.editorstacks.index(editorstack)
self.editorstacks.pop(index)
... | python | def unregister_editorstack(self, editorstack):
"""Removing editorstack only if it's not the last remaining"""
self.remove_last_focus_editorstack(editorstack)
if len(self.editorstacks) > 1:
index = self.editorstacks.index(editorstack)
self.editorstacks.pop(index)
... | [
"def",
"unregister_editorstack",
"(",
"self",
",",
"editorstack",
")",
":",
"self",
".",
"remove_last_focus_editorstack",
"(",
"editorstack",
")",
"if",
"len",
"(",
"self",
".",
"editorstacks",
")",
">",
"1",
":",
"index",
"=",
"self",
".",
"editorstacks",
"... | Removing editorstack only if it's not the last remaining | [
"Removing",
"editorstack",
"only",
"if",
"it",
"s",
"not",
"the",
"last",
"remaining"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L1202-L1211 | train | Removes the given editorstack only if it s not the last remaining | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/editor/plugin.py | Editor.setup_other_windows | def setup_other_windows(self):
"""Setup toolbars and menus for 'New window' instances"""
self.toolbar_list = ((_("File toolbar"), "file_toolbar",
self.main.file_toolbar_actions),
(_("Search toolbar"), "search_toolbar",
... | python | def setup_other_windows(self):
"""Setup toolbars and menus for 'New window' instances"""
self.toolbar_list = ((_("File toolbar"), "file_toolbar",
self.main.file_toolbar_actions),
(_("Search toolbar"), "search_toolbar",
... | [
"def",
"setup_other_windows",
"(",
"self",
")",
":",
"self",
".",
"toolbar_list",
"=",
"(",
"(",
"_",
"(",
"\"File toolbar\"",
")",
",",
"\"file_toolbar\"",
",",
"self",
".",
"main",
".",
"file_toolbar_actions",
")",
",",
"(",
"_",
"(",
"\"Search toolbar\"",... | Setup toolbars and menus for 'New window' instances | [
"Setup",
"toolbars",
"and",
"menus",
"for",
"New",
"window",
"instances"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L1245-L1271 | train | Setup toolbars and menus for other windows | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/editor/plugin.py | Editor.set_current_filename | def set_current_filename(self, filename, editorwindow=None, focus=True):
"""Set focus to *filename* if this file has been opened.
Return the editor instance associated to *filename*.
"""
editorstack = self.get_current_editorstack(editorwindow)
return editorstack.set_curren... | python | def set_current_filename(self, filename, editorwindow=None, focus=True):
"""Set focus to *filename* if this file has been opened.
Return the editor instance associated to *filename*.
"""
editorstack = self.get_current_editorstack(editorwindow)
return editorstack.set_curren... | [
"def",
"set_current_filename",
"(",
"self",
",",
"filename",
",",
"editorwindow",
"=",
"None",
",",
"focus",
"=",
"True",
")",
":",
"editorstack",
"=",
"self",
".",
"get_current_editorstack",
"(",
"editorwindow",
")",
"return",
"editorstack",
".",
"set_current_f... | Set focus to *filename* if this file has been opened.
Return the editor instance associated to *filename*. | [
"Set",
"focus",
"to",
"*",
"filename",
"*",
"if",
"this",
"file",
"has",
"been",
"opened",
".",
"Return",
"the",
"editor",
"instance",
"associated",
"to",
"*",
"filename",
"*",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L1343-L1349 | train | Set focus to filename if this file has been opened. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/editor/plugin.py | Editor.refresh_file_dependent_actions | def refresh_file_dependent_actions(self):
"""Enable/disable file dependent actions
(only if dockwidget is visible)"""
if self.dockwidget and self.dockwidget.isVisible():
enable = self.get_current_editor() is not None
for action in self.file_dependent_actions:
... | python | def refresh_file_dependent_actions(self):
"""Enable/disable file dependent actions
(only if dockwidget is visible)"""
if self.dockwidget and self.dockwidget.isVisible():
enable = self.get_current_editor() is not None
for action in self.file_dependent_actions:
... | [
"def",
"refresh_file_dependent_actions",
"(",
"self",
")",
":",
"if",
"self",
".",
"dockwidget",
"and",
"self",
".",
"dockwidget",
".",
"isVisible",
"(",
")",
":",
"enable",
"=",
"self",
".",
"get_current_editor",
"(",
")",
"is",
"not",
"None",
"for",
"act... | Enable/disable file dependent actions
(only if dockwidget is visible) | [
"Enable",
"/",
"disable",
"file",
"dependent",
"actions",
"(",
"only",
"if",
"dockwidget",
"is",
"visible",
")"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L1365-L1371 | train | Enable or disable file dependent actions | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/editor/plugin.py | Editor.refresh_save_all_action | def refresh_save_all_action(self):
"""Enable 'Save All' if there are files to be saved"""
editorstack = self.get_current_editorstack()
if editorstack:
state = any(finfo.editor.document().isModified() or finfo.newly_created
for finfo in editorstack.data)
... | python | def refresh_save_all_action(self):
"""Enable 'Save All' if there are files to be saved"""
editorstack = self.get_current_editorstack()
if editorstack:
state = any(finfo.editor.document().isModified() or finfo.newly_created
for finfo in editorstack.data)
... | [
"def",
"refresh_save_all_action",
"(",
"self",
")",
":",
"editorstack",
"=",
"self",
".",
"get_current_editorstack",
"(",
")",
"if",
"editorstack",
":",
"state",
"=",
"any",
"(",
"finfo",
".",
"editor",
".",
"document",
"(",
")",
".",
"isModified",
"(",
")... | Enable 'Save All' if there are files to be saved | [
"Enable",
"Save",
"All",
"if",
"there",
"are",
"files",
"to",
"be",
"saved"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L1373-L1379 | train | Enable Save All action if there are files to be saved | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/editor/plugin.py | Editor.update_warning_menu | def update_warning_menu(self):
"""Update warning list menu"""
editor = self.get_current_editor()
check_results = editor.get_current_warnings()
self.warning_menu.clear()
filename = self.get_current_filename()
for message, line_number in check_results:
er... | python | def update_warning_menu(self):
"""Update warning list menu"""
editor = self.get_current_editor()
check_results = editor.get_current_warnings()
self.warning_menu.clear()
filename = self.get_current_filename()
for message, line_number in check_results:
er... | [
"def",
"update_warning_menu",
"(",
"self",
")",
":",
"editor",
"=",
"self",
".",
"get_current_editor",
"(",
")",
"check_results",
"=",
"editor",
".",
"get_current_warnings",
"(",
")",
"self",
".",
"warning_menu",
".",
"clear",
"(",
")",
"filename",
"=",
"sel... | Update warning list menu | [
"Update",
"warning",
"list",
"menu"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L1381-L1393 | train | Update warning list menu | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/editor/plugin.py | Editor.update_todo_menu | def update_todo_menu(self):
"""Update todo list menu"""
editorstack = self.get_current_editorstack()
results = editorstack.get_todo_results()
self.todo_menu.clear()
filename = self.get_current_filename()
for text, line0 in results:
icon = ima.icon('todo... | python | def update_todo_menu(self):
"""Update todo list menu"""
editorstack = self.get_current_editorstack()
results = editorstack.get_todo_results()
self.todo_menu.clear()
filename = self.get_current_filename()
for text, line0 in results:
icon = ima.icon('todo... | [
"def",
"update_todo_menu",
"(",
"self",
")",
":",
"editorstack",
"=",
"self",
".",
"get_current_editorstack",
"(",
")",
"results",
"=",
"editorstack",
".",
"get_todo_results",
"(",
")",
"self",
".",
"todo_menu",
".",
"clear",
"(",
")",
"filename",
"=",
"self... | Update todo list menu | [
"Update",
"todo",
"list",
"menu"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L1395-L1406 | train | Update todo list menu | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/editor/plugin.py | Editor.todo_results_changed | def todo_results_changed(self):
"""
Synchronize todo results between editorstacks
Refresh todo list navigation buttons
"""
editorstack = self.get_current_editorstack()
results = editorstack.get_todo_results()
index = editorstack.get_stack_index()
i... | python | def todo_results_changed(self):
"""
Synchronize todo results between editorstacks
Refresh todo list navigation buttons
"""
editorstack = self.get_current_editorstack()
results = editorstack.get_todo_results()
index = editorstack.get_stack_index()
i... | [
"def",
"todo_results_changed",
"(",
"self",
")",
":",
"editorstack",
"=",
"self",
".",
"get_current_editorstack",
"(",
")",
"results",
"=",
"editorstack",
".",
"get_todo_results",
"(",
")",
"index",
"=",
"editorstack",
".",
"get_stack_index",
"(",
")",
"if",
"... | Synchronize todo results between editorstacks
Refresh todo list navigation buttons | [
"Synchronize",
"todo",
"results",
"between",
"editorstacks",
"Refresh",
"todo",
"list",
"navigation",
"buttons"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L1408-L1421 | train | Updates the todo results of the editorstacks with the new values. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/editor/plugin.py | Editor.opened_files_list_changed | def opened_files_list_changed(self):
"""
Opened files list has changed:
--> open/close file action
--> modification ('*' added to title)
--> current edited file has changed
"""
# Refresh Python file dependent actions:
editor = self.get_current_edit... | python | def opened_files_list_changed(self):
"""
Opened files list has changed:
--> open/close file action
--> modification ('*' added to title)
--> current edited file has changed
"""
# Refresh Python file dependent actions:
editor = self.get_current_edit... | [
"def",
"opened_files_list_changed",
"(",
"self",
")",
":",
"# Refresh Python file dependent actions:\r",
"editor",
"=",
"self",
".",
"get_current_editor",
"(",
")",
"if",
"editor",
":",
"python_enable",
"=",
"editor",
".",
"is_python",
"(",
")",
"cython_enable",
"="... | Opened files list has changed:
--> open/close file action
--> modification ('*' added to title)
--> current edited file has changed | [
"Opened",
"files",
"list",
"has",
"changed",
":",
"--",
">",
"open",
"/",
"close",
"file",
"action",
"--",
">",
"modification",
"(",
"*",
"added",
"to",
"title",
")",
"--",
">",
"current",
"edited",
"file",
"has",
"changed"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L1436-L1458 | train | Updates the action list with the new values. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/editor/plugin.py | Editor.update_code_analysis_actions | def update_code_analysis_actions(self):
"""Update actions in the warnings menu."""
editor = self.get_current_editor()
# To fix an error at startup
if editor is None:
return
results = editor.get_current_warnings()
# Update code analysis buttons
... | python | def update_code_analysis_actions(self):
"""Update actions in the warnings menu."""
editor = self.get_current_editor()
# To fix an error at startup
if editor is None:
return
results = editor.get_current_warnings()
# Update code analysis buttons
... | [
"def",
"update_code_analysis_actions",
"(",
"self",
")",
":",
"editor",
"=",
"self",
".",
"get_current_editor",
"(",
")",
"# To fix an error at startup\r",
"if",
"editor",
"is",
"None",
":",
"return",
"results",
"=",
"editor",
".",
"get_current_warnings",
"(",
")"... | Update actions in the warnings menu. | [
"Update",
"actions",
"in",
"the",
"warnings",
"menu",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L1460-L1474 | train | Update actions in the warnings menu. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/editor/plugin.py | Editor.save_bookmarks | def save_bookmarks(self, filename, bookmarks):
"""Receive bookmark changes and save them."""
filename = to_text_string(filename)
bookmarks = to_text_string(bookmarks)
filename = osp.normpath(osp.abspath(filename))
bookmarks = eval(bookmarks)
save_bookmarks(filename,... | python | def save_bookmarks(self, filename, bookmarks):
"""Receive bookmark changes and save them."""
filename = to_text_string(filename)
bookmarks = to_text_string(bookmarks)
filename = osp.normpath(osp.abspath(filename))
bookmarks = eval(bookmarks)
save_bookmarks(filename,... | [
"def",
"save_bookmarks",
"(",
"self",
",",
"filename",
",",
"bookmarks",
")",
":",
"filename",
"=",
"to_text_string",
"(",
"filename",
")",
"bookmarks",
"=",
"to_text_string",
"(",
"bookmarks",
")",
"filename",
"=",
"osp",
".",
"normpath",
"(",
"osp",
".",
... | Receive bookmark changes and save them. | [
"Receive",
"bookmark",
"changes",
"and",
"save",
"them",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/plugin.py#L1508-L1514 | train | Receive bookmark changes and save them. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.