MCPcopy Index your code
hub / github.com/pymupdf/PyMuPDF / _command_lines

Function _command_lines

pipcl.py:2692–2711  ·  view source on GitHub ↗

Process multiline command by running through `textwrap.dedent()`, removes comments (lines starting with `#` or ` #` until end of line), removes entirely blank lines. Returns list of lines.

( command)

Source from the content-addressed store, hash-verified

2690#
2691
2692def _command_lines( command):
2693 '''
2694 Process multiline command by running through `textwrap.dedent()`, removes
2695 comments (lines starting with `#` or ` #` until end of line), removes
2696 entirely blank lines.
2697
2698 Returns list of lines.
2699 '''
2700 command = textwrap.dedent( command)
2701 lines = []
2702 for line in command.split( '\n'):
2703 if line.startswith( '#'):
2704 h = 0
2705 else:
2706 h = line.find( ' #')
2707 if h >= 0:
2708 line = line[:h]
2709 if line.strip():
2710 lines.append(line.rstrip())
2711 return lines
2712
2713
2714def cpu_bits():

Callers 1

runFunction · 0.85

Calls 2

findMethod · 0.80
appendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…