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

Function _indent

tools/python-3.11.9-amd64/Lib/doctest.py:236–242  ·  view source on GitHub ↗

Add the given number of space characters to the beginning of every non-blank line in `s`, and return the result.

(s, indent=4)

Source from the content-addressed store, hash-verified

234 return f.read(), filename
235
236def _indent(s, indent=4):
237 """
238 Add the given number of space characters to the beginning of
239 every non-blank line in `s`, and return the result.
240 """
241 # This regexp matches the start of non-blank lines:
242 return re.sub('(?m)^(?!$)', indent*' ', s)
243
244def _exception_traceback(exc_info):
245 """

Callers 4

report_startMethod · 0.85
_failure_headerMethod · 0.85
output_differenceMethod · 0.85

Calls 1

subMethod · 0.45

Tested by

no test coverage detected