MCPcopy Index your code
hub / github.com/RustPython/RustPython / text_normalize

Method text_normalize

Lib/test/test_dis.py:2534–2540  ·  view source on GitHub ↗

Dedent *string* and strip it from its surrounding whitespaces. This method is used by the other utility functions so that any string to write or to match against can be freely indented.

(string)

Source from the content-addressed store, hash-verified

2532
2533 @staticmethod
2534 def text_normalize(string):
2535 """Dedent *string* and strip it from its surrounding whitespaces.
2536
2537 This method is used by the other utility functions so that any
2538 string to write or to match against can be freely indented.
2539 """
2540 return textwrap.dedent(string).strip()
2541
2542 def set_source(self, content):
2543 with open(self.filename, 'w') as fp:

Callers 3

set_sourceMethod · 0.95
invoke_disMethod · 0.95
check_outputMethod · 0.95

Calls 2

dedentMethod · 0.80
stripMethod · 0.45

Tested by

no test coverage detected