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

Function indentsize

tools/python-3.11.9-amd64/Lib/inspect.py:767–770  ·  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

765
766# -------------------------------------------------- source code extraction
767def indentsize(line):
768 """Return the indent size, in spaces, at the start of a line of text."""
769 expline = line.expandtabs()
770 return len(expline) - len(expline.lstrip())
771
772def _findclass(func):
773 cls = sys.modules.get(func.__module__)

Callers 1

getcommentsFunction · 0.85

Calls 2

expandtabsMethod · 0.80
lstripMethod · 0.80

Tested by

no test coverage detected