realpython / pytest-mypy

Mypy static type checker plugin for Pytest
https://pypi.org/project/pytest-mypy/
MIT License
248 stars 32 forks source link

Option to suppress 'mypy-status' error #176

Closed jaraco closed 2 months ago

jaraco commented 2 months ago

When one of the mypy checks fail, it also reports a failure in the 'mypy-status' at the beginning of the test run. As a result, running with -x (fail fast) will always emit an inactionable error. Personally, I just find that error useless noise and I'd like to suppress it. Could you add an option to suppress this error and only report the per-file errors?

dmtucker commented 2 months ago

I didn't connect the two at first, but this sounds essentially the same as #120...

179 delivers a suppression mechanism, --mypy-no-status-check, as-stated (which hadn't come up in that thread, btw),

but I'd like to improve the default behavior with -x at some point without having to suppress the status check too. (FWIW, it's purpose is to indicate that mypy failed, which is the only indication anything went wrong when mypy fails on one or more files that weren't collected by pytest.)