MCPcopy Create free account
hub / github.com/python/cpython / report

Method report

Tools/clinic/libclinic/errors.py:15–23  ·  view source on GitHub ↗
(self, *, warn_only: bool = False)

Source from the content-addressed store, hash-verified

13 super().__init__(self.message)
14
15 def report(self, *, warn_only: bool = False) -> str:
16 msg = "Warning" if warn_only else "Error"
17 if self.filename is not None:
18 msg += f" in file {self.filename!r}"
19 if self.lineno is not None:
20 msg += f" on line {self.lineno}"
21 msg += ":\n"
22 msg += f"{self.message}\n"
23 return msg
24
25
26class ParseError(ClinicError):

Callers 2

warn_or_failFunction · 0.95
mainFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected