Skip to content

Commit f2cff4e

Browse files
committed
plugin_error: output to stderr
1 parent 6fb1423 commit f2cff4e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

mypy/build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ def load_plugins(options: Options,
352352

353353
def plugin_error(message: str) -> None:
354354
errors.report(line, 0, message)
355-
errors.raise_error()
355+
errors.raise_error(use_stdout=False)
356356

357357
custom_plugins = [] # type: List[Plugin]
358358
errors.set_file(options.config_file, None)

mypy/errors.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -399,15 +399,15 @@ def is_errors_for_file(self, file: str) -> bool:
399399
"""Are there any errors for the given file?"""
400400
return file in self.error_info_map
401401

402-
def raise_error(self) -> None:
402+
def raise_error(self, use_stdout: bool = True) -> None:
403403
"""Raise a CompileError with the generated messages.
404404
405405
Render the messages suitable for displaying.
406406
"""
407407
# self.new_messages() will format all messages that haven't already
408408
# been returned from a file_messages() call.
409409
raise CompileError(self.new_messages(),
410-
use_stdout=True,
410+
use_stdout=use_stdout,
411411
module_with_blocker=self.blocker_module())
412412

413413
def format_messages(self, error_info: List[ErrorInfo],

0 commit comments

Comments
 (0)