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

Method valid_line

Tools/clinic/libclinic/dsl_parser.py:523–533  ·  view source on GitHub ↗
(self, line: str)

Source from the content-addressed store, hash-verified

521 }
522
523 def valid_line(self, line: str) -> bool:
524 # ignore comment-only lines
525 if line.lstrip().startswith('#'):
526 return False
527
528 # Ignore empty lines too
529 # (but not in docstring sections!)
530 if not self.in_docstring() and not line.strip():
531 return False
532
533 return True
534
535 def next(
536 self,

Callers 6

state_dsl_startMethod · 0.95
state_modulename_nameMethod · 0.95
state_parameterMethod · 0.95

Calls 4

in_docstringMethod · 0.95
startswithMethod · 0.45
lstripMethod · 0.45
stripMethod · 0.45

Tested by

no test coverage detected