MCPcopy Index your code
hub / github.com/python/cpython / run

Method run

Lib/idlelib/editor.py:1605–1617  ·  view source on GitHub ↗

Return 2 lines containing block opener and indent. Either the indent line or both may be None.

(self)

Source from the content-addressed store, hash-verified

1603 self.finished = 1
1604
1605 def run(self):
1606 """Return 2 lines containing block opener and indent.
1607
1608 Either the indent line or both may be None.
1609 """
1610 try:
1611 tokens = tokenize.generate_tokens(self.readline)
1612 for token in tokens:
1613 self.tokeneater(*token)
1614 except (tokenize.TokenError, SyntaxError):
1615 # Stopping the tokenizer early can trigger spurious errors.
1616 pass
1617 return self.blkopenline, self.indentedline
1618
1619### end autoindent code ###
1620

Callers 1

guess_indentMethod · 0.45

Calls 1

tokeneaterMethod · 0.95

Tested by

no test coverage detected