MCPcopy
hub / github.com/celery/celery / indent

Function indent

celery/utils/text.py:84–86  ·  view source on GitHub ↗

Indent text.

(t: str, indent: int = 0, sep: str = '\n')

Source from the content-addressed store, hash-verified

82
83
84def indent(t: str, indent: int = 0, sep: str = '\n') -> str:
85 """Indent text."""
86 return sep.join(' ' * indent + p for p in t.split(sep))
87
88
89def truncate(s: str, maxlen: int = 128, suffix: str = '...') -> str:

Callers 1

test_textindentMethod · 0.90

Calls 1

joinMethod · 0.45

Tested by 1

test_textindentMethod · 0.72