MCPcopy
hub / github.com/python/mypy / indent

Function indent

mypy/strconv.py:703–707  ·  view source on GitHub ↗

Indent all the lines in s (separated by newlines) by n spaces.

(s: str, n: int)

Source from the content-addressed store, hash-verified

701
702
703def indent(s: str, n: int) -> str:
704 """Indent all the lines in s (separated by newlines) by n spaces."""
705 s = " " * n + s
706 s = s.replace("\n", "\n" + " " * n)
707 return s

Callers 1

dump_taggedFunction · 0.85

Calls 1

replaceMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…