-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Success message missing when reveal_type() used. #12302
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
Comments
This happens if there are only notes (notes still cause failure, but no error count) in the output: |
I think that if there are only notes, and no errors or blockers, the return code should be success as well. I wrote a replacement for the code in
You can use this code. |
@97littleleaf11 Here is a workaround: from typing import *
error: Literal[": error:"]
reveal_type(error)
https://mypy-play.net/?mypy=latest&python=3.10&gist=50bd436765ad217d1cc28568221c7c5f |
@KotlinIsland I think we can leave this corner case behind. |
What I meant was, it is a workaround to the issue in the OP 😂 |
Bug Report
I have something like
if TYPE_CHECKING: reveal_type(foo)
in a module (in 5 places).mypy finds no errors, but the line that says "success" is missing.
Here's two sets of output from mypy, first with reveal_type() in the module, and second without.
What I think is correct output, in the first case, is
Your Environment
The text was updated successfully, but these errors were encountered: