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

Method reindent_to

Lib/idlelib/editor.py:1522–1530  ·  view source on GitHub ↗
(self, column)

Source from the content-addressed store, hash-verified

1520 # column logical (meaning use tabs if appropriate) spaces.
1521
1522 def reindent_to(self, column):
1523 text = self.text
1524 text.undo_block_start()
1525 if text.compare("insert linestart", "!=", "insert"):
1526 text.delete("insert linestart", "insert")
1527 if column:
1528 text.insert("insert", self._make_blanks(column),
1529 self.user_input_insert_tags)
1530 text.undo_block_stop()
1531
1532 # Guess indentwidth from text content.
1533 # Return guessed indentwidth. This should not be believed unless

Callers 2

smart_indent_eventMethod · 0.95

Calls 6

_make_blanksMethod · 0.95
undo_block_startMethod · 0.45
compareMethod · 0.45
deleteMethod · 0.45
insertMethod · 0.45
undo_block_stopMethod · 0.45

Tested by

no test coverage detected