MCPcopy Index your code
hub / github.com/numpy/numpy / _get_indent

Function _get_indent

numpy/lib/_utils_impl.py:123–134  ·  view source on GitHub ↗

Determines the leading whitespace that could be removed from all the lines.

(lines)

Source from the content-addressed store, hash-verified

121
122
123def _get_indent(lines):
124 """
125 Determines the leading whitespace that could be removed from all the lines.
126 """
127 indent = sys.maxsize
128 for line in lines:
129 content = len(line.lstrip())
130 if content:
131 indent = min(indent, len(line) - content)
132 if indent == sys.maxsize:
133 indent = 0
134 return indent
135
136
137#-----------------------------------------------------------------------------

Callers

nothing calls this directly

Calls 2

lstripMethod · 0.80
minFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…