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

Function _ind

Tools/c-analyzer/c_parser/parser/_regexes.py:9–16  ·  view source on GitHub ↗
(text, level=1, edges='both')

Source from the content-addressed store, hash-verified

7
8
9def _ind(text, level=1, edges='both'):
10 indent = ' ' * level
11 text = textwrap.indent(text, indent)
12 if edges == 'pre' or edges == 'both':
13 text = '\n' + indent + text.lstrip()
14 if edges == 'post' or edges == 'both':
15 text = text.rstrip() + '\n' + ' ' * (level - 1)
16 return text
17
18
19#######################################

Callers 3

_capi.pyFile · 0.90
_regexes.pyFile · 0.85
_common.pyFile · 0.85

Calls 3

indentMethod · 0.45
lstripMethod · 0.45
rstripMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…