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

Function indentsize

Lib/inspect.py:695–698  ·  view source on GitHub ↗

Return the indent size, in spaces, at the start of a line of text.

(line)

Source from the content-addressed store, hash-verified

693
694# -------------------------------------------------- source code extraction
695def indentsize(line):
696 """Return the indent size, in spaces, at the start of a line of text."""
697 expline = line.expandtabs()
698 return len(expline) - len(expline.lstrip())
699
700def _findclass(func):
701 cls = sys.modules.get(func.__module__)

Callers 1

getcommentsFunction · 0.85

Calls 2

expandtabsMethod · 0.45
lstripMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…