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

Method state_parameters_start

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

Source from the content-addressed store, hash-verified

804 # ParamState class.
805
806 def state_parameters_start(self, line: str) -> None:
807 if not self.valid_line(line):
808 return
809
810 # if this line is not indented, we have no parameters
811 if not self.indent.infer(line):
812 return self.next(self.state_function_docstring, line)
813
814 assert self.function is not None
815 if self.function.kind in {GETTER, SETTER}:
816 getset = self.function.kind.name.lower()
817 fail(f"@{getset} methods cannot define parameters")
818
819 self.parameter_continuation = ''
820 return self.next(self.state_parameter, line)
821
822
823 def to_required(self) -> None:

Callers

nothing calls this directly

Calls 5

valid_lineMethod · 0.95
nextMethod · 0.95
failFunction · 0.90
inferMethod · 0.80
lowerMethod · 0.45

Tested by

no test coverage detected