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

Method _min_indent

Lib/doctest.py:800–806  ·  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

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

Callers 1

parseMethod · 0.95

Calls 1

findallMethod · 0.45

Tested by

no test coverage detected