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 treat mypy failures as warnings #177

Closed jaraco closed 1 month ago

jaraco commented 2 months ago

In jaraco/skeleton#143, I'm attempting to adopt more strict mypy settings for my projects. Because these checks are part of the test suite and CI checks, any failed check breaks the integration.

I'd like a way to treat mypy errors as non-blocking, to get a report of failures but not fail the check, similar to how warnings work in pytest. It would be nice if pytest-mypy could expose an option to do something similar.

I could see a number of ways to approach this need:

Maybe there are other options too.

dmtucker commented 1 month ago

I've taken a stab at this in #180. @jaraco could you take a look when you get a chance and see if it meets your needs?