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

Method _format_output

Lib/test/support/venv.py:42–49  ·  view source on GitHub ↗
(self, name, data, indent='\t')

Source from the content-addressed store, hash-verified

40 return os.path.join(self.paths['scripts'], os.path.basename(sys.executable))
41
42 def _format_output(self, name, data, indent='\t'):
43 if not data:
44 return indent + f'{name}: (none)'
45 if len(data.splitlines()) == 1:
46 return indent + f'{name}: {data}'
47 else:
48 prefixed_lines = '\n'.join(indent + '> ' + line for line in data.splitlines())
49 return indent + f'{name}:\n' + prefixed_lines
50
51 def run(self, *args, **subprocess_args):
52 if subprocess_args.get('shell'):

Callers 1

runMethod · 0.95

Calls 2

splitlinesMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected