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

Method raise_error

mypy/errors.py:1010–1019  ·  view source on GitHub ↗

Raise a CompileError with the generated messages. Render the messages suitable for displaying.

(self, use_stdout: bool = True)

Source from the content-addressed store, hash-verified

1008 return False
1009
1010 def raise_error(self, use_stdout: bool = True) -> NoReturn:
1011 """Raise a CompileError with the generated messages.
1012
1013 Render the messages suitable for displaying.
1014 """
1015 # self.new_messages() will format all messages that haven't already
1016 # been returned from a file_messages() call.
1017 raise CompileError(
1018 self.new_messages(), use_stdout=use_stdout, module_with_blocker=self.blocker_module()
1019 )
1020
1021 def format_messages_default(
1022 self, error_tuples: list[ErrorTuple], source_lines: list[str] | None

Callers 9

test_parserFunction · 0.95
test_parse_errorFunction · 0.95
plugin_errorFunction · 0.80
__init__Method · 0.80
parse_parallelMethod · 0.80
check_blockersMethod · 0.80
parse_fileMethod · 0.80
module_not_foundFunction · 0.80
load_graphFunction · 0.80

Calls 3

new_messagesMethod · 0.95
blocker_moduleMethod · 0.95
CompileErrorClass · 0.85

Tested by 2

test_parserFunction · 0.76
test_parse_errorFunction · 0.76