MCPcopy Create free account
hub / github.com/ipython/ipython / get_indent_spaces

Method get_indent_spaces

IPython/core/inputsplitter.py:499–507  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

497 return True
498
499 def get_indent_spaces(self):
500 sourcefor, n = self._indent_spaces_cache
501 if sourcefor == self.source:
502 return n
503
504 # self.source always has a trailing newline
505 n = find_next_indent(self.source[:-1])
506 self._indent_spaces_cache = (self.source, n)
507 return n
508
509 # Backwards compatibility. I think all code that used .indent_spaces was
510 # inside IPython, but we can leave this here until IPython 7 in case any

Callers 15

check_completeMethod · 0.95
push_accepts_moreMethod · 0.95
mini_interactive_loopFunction · 0.95
_indent_current_strMethod · 0.80
test_resetMethod · 0.80
test_indentMethod · 0.80
test_indent2Method · 0.80
test_indent3Method · 0.80
test_indent4Method · 0.80
test_dedent_passMethod · 0.80
test_dedent_breakMethod · 0.80
test_dedent_continueMethod · 0.80

Calls 1

find_next_indentFunction · 0.85

Tested by 11

mini_interactive_loopFunction · 0.76
test_resetMethod · 0.64
test_indentMethod · 0.64
test_indent2Method · 0.64
test_indent3Method · 0.64
test_indent4Method · 0.64
test_dedent_passMethod · 0.64
test_dedent_breakMethod · 0.64
test_dedent_continueMethod · 0.64
test_dedent_raiseMethod · 0.64
test_dedent_returnMethod · 0.64