MCPcopy Index your code
hub / github.com/RustPython/RustPython / _min_indent

Method _min_indent

Lib/doctest.py:806–812  ·  view source on GitHub ↗

Return the minimum indentation of any non-blank line in `s`

(self, s)

Source from the content-addressed store, hash-verified

804 _INDENT_RE = re.compile(r'^([ ]*)(?=\S)', re.MULTILINE)
805
806 def _min_indent(self, s):
807 "Return the minimum indentation of any non-blank line in `s`"
808 indents = [len(indent) for indent in self._INDENT_RE.findall(s)]
809 if len(indents) > 0:
810 return min(indents)
811 else:
812 return 0
813
814 def _check_prompt_blank(self, lines, indent, name, lineno):
815 """

Callers 1

parseMethod · 0.95

Calls 3

lenFunction · 0.85
minFunction · 0.85
findallMethod · 0.45

Tested by

no test coverage detected