diff --git a/prospector/run.py b/prospector/run.py index 5f5c5d60..793aa642 100644 --- a/prospector/run.py +++ b/prospector/run.py @@ -113,7 +113,8 @@ def execute(self) -> None: loc = Location(self.config.workdir, None, None, None, None) msg = ( f"Tool {toolname} failed to run " - f"(exception was raised, re-run prospector with -X to see the stacktrace)" + "(exception was raised, re-run prospector with --direct-tool-stdout to better see the tool error " + "or --die-on-tool-error to see the stacktrace)" ) message = Message( toolname, diff --git a/prospector/tools/mypy/__init__.py b/prospector/tools/mypy/__init__.py index 0756d1a8..e3d2045e 100644 --- a/prospector/tools/mypy/__init__.py +++ b/prospector/tools/mypy/__init__.py @@ -126,25 +126,7 @@ def run(self, found_files: FileFinder) -> list[Message]: def _run_std(self, args: list[str]) -> list[Message]: messages = [] - try: - sources, options = mypy.main.process_options(args, fscache=self.fscache) - except (SystemExit, Exception) as e: - message = "The error(s) will be displayed before the messages" if isinstance(e, SystemExit) else str(e) - messages.append( - Message( - "mypy", - code="fatal-options-error", - message=message, - location=Location( - path="", - module=None, - function=None, - line=0, - character=0, - ), - ) - ) - return messages + sources, options = mypy.main.process_options(args, fscache=self.fscache) options.output = "json" try: res = mypy.build.build(sources, options, fscache=self.fscache) diff --git a/prospector/tools/pyroma/__init__.py b/prospector/tools/pyroma/__init__.py index c4906275..3e15d465 100644 --- a/prospector/tools/pyroma/__init__.py +++ b/prospector/tools/pyroma/__init__.py @@ -46,7 +46,7 @@ "BusFactor": "PYR19", } -PYROMA_CODES = {} +PYROMA_CODES: dict[str, str] = {} def _copy_codes() -> None: