-
-
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
(🐞) An error should be reported when reveal_type
is used but not called
#12285
Comments
This is intentional and documented. mypy (and other type checkers) treat reveal_type like a builtin |
@hauntsaninja Thanks for the quick response!, but I think you might have mis-understood my bug report. I'm well aware of how I've updated the OP to clarify. |
Okay, I can see how a non-zero exit code would be nice to have there, but this is low priority for me. On a similar note, maybe we shouldn't have non-zero exit status code for use of |
reveal_type
is defined
I think the exit status issue is muddling the waters here. That's an unrelated change. The original request was for an error if you use |
I think that exit 1 on |
reveal_type
is used but not called
Issue:
When
reveal_type
is called (reveal_type(1)
) mypy reports a note and exits with status 1, but whenreveal_type
is used as a value without being called mypy doesn't report any error or note.reveal_type
actual:
expected:
The text was updated successfully, but these errors were encountered: