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

Function get_indent

Lib/idlelib/format.py:183–185  ·  view source on GitHub ↗

Return the initial space or tab indent of line.

(line)

Source from the content-addressed store, hash-verified

181 return re.match(r"^\s*$", line) is not None
182
183def get_indent(line):
184 """Return the initial space or tab indent of line."""
185 return re.match(r"^([ \t]*)", line).group()
186
187def get_comment_header(line):
188 """Return string with leading whitespace and '#' from line or ''.

Callers 1

reformat_paragraphFunction · 0.85

Calls 2

groupMethod · 0.45
matchMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…