-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
assert_type()
says an int is not an int
#12923
Comments
Lol, it's probably |
Yeah, pyright also gives an error |
Implementation hints: 42 has type |
Looks like I self-assigned this but then forgot about it. I'm happy to leave this to a sprint contributor. As the author of assert_type(), I think it's reasonable for a type checker to fail on mypy's current behavior is actually different from what this issue reports:
I think this behavior is wrong: exactly one of these two should succeed, but not both. Which of the two is up to the type checker to decide. For both pyanalyze and pyright, |
working on it... |
Success: no issues found in 170 source files |
The following code:
fails to typecheck with the following message:
Your Environment
mypy.ini
(and other config files): noneThe text was updated successfully, but these errors were encountered: