MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / _min_indent

Method _min_indent

tools/python-3.11.9-amd64/Lib/doctest.py:779–785  ·  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

777 _INDENT_RE = re.compile(r'^([ ]*)(?=\S)', re.MULTILINE)
778
779 def _min_indent(self, s):
780 "Return the minimum indentation of any non-blank line in `s`"
781 indents = [len(indent) for indent in self._INDENT_RE.findall(s)]
782 if len(indents) > 0:
783 return min(indents)
784 else:
785 return 0
786
787 def _check_prompt_blank(self, lines, indent, name, lineno):
788 """

Callers 1

parseMethod · 0.95

Calls 2

minFunction · 0.85
findallMethod · 0.45

Tested by

no test coverage detected