-
-
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
Optional[Any] is lost in cached run #11834
Comments
In this case it looks like it is just simplified to |
This doesn't appear to have anything to do with whether the cache is populated. Running mypy without From what I can tell, the reason that adding However, when The bug (or questionable behavior) is mypy changing the type of the argument from I'm not really sure what the correct behavior according to PEP 484 is. My reading of PEP 484 suggests that, when implicit optional is being used, any |
This error is generated only if I'm not able to repro the inconsistent behavior. It either generates the error (if |
Greetings!
Found a weird mypy result to my code.
You can reproducate with the code:
(mypytest.py)
Run #1:
Run #2:
I'm always use
--strict
for checking my code, but it seems in this case fails.Environment:
The text was updated successfully, but these errors were encountered: