MCPcopy
hub / github.com/python/mypy / ErrorMessage

Class ErrorMessage

mypy/message_registry.py:17–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15
16
17class ErrorMessage:
18 def __init__(self, value: str, code: ErrorCode | None = None) -> None:
19 self.value: Final = value
20 self.code: Final = code
21
22 def format(self, *args: object, **kwargs: object) -> ErrorMessage:
23 return ErrorMessage(self.value.format(*args, **kwargs), code=self.code)
24
25 def with_additional_msg(self, info: str) -> ErrorMessage:
26 return ErrorMessage(self.value + info, code=self.code)
27
28
29# Invalid types

Callers 8

check_func_defMethod · 0.90
check_default_paramsMethod · 0.90
check_subtypeMethod · 0.90
fail_argMethod · 0.90
formatMethod · 0.85
with_additional_msgMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…