-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using reveal_type with no errors should return exit code 0 #10013
Comments
I do think since IIRC we moved |
Fixes #10013 See #13851 (comment) for motivation, also this sounds generally reasonable.
The downside to this is that mypy will now report that invalid code is correct due to the fact that
Where previously mypy would warn that there is something invalid:
But this isn't the biggest issue in the world, as any linter(flake8/pylint/qodana) should pick this up. |
|
Bug Report
When using pytest-mypy to test some dynamically determined types (with generics) results in a false-positive error in CI, because mypy's exit code becomes 1 when there are no errors but only
reveal_type
outputs.To Reproduce
Just write an arbitrary Python file that has no type errors and put
reveal_type()
to any one of the identifiers.Run mypy against that file and check the exit code.
I'd like to keep
reveal_type()
in my code, to test a mixture of runtime type validation and static typing results usingtypeguard
, generics, andpytest-mypy
plugin.Expected Behavior
When there are no errors but only some
reveal_type
outputs,mypy
executable should set the exit code 0.Actual Behavior
It sets the exit code 1, breaking my CI.
Your Environment
The text was updated successfully, but these errors were encountered: