-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
TYP: typing errors for mypy==0.790 #37104
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
Is the error for L452 in common.py right? Seems fine to add a list of strings and None to a list of strings. |
This seems a common issue in expressions with concatinating lists. Mypy inference determines the type from the first sequence. when assigning the result, then it is the type of the result that is important, so these errors could be considered false positives. It is quite messy to add casts to resolve these, so ignores are probably OK. It is possible to refactor, using unpacking, so that mypy doesn't complain, but I don't think this method gets universal approval. i.e. ["foo", None] + [1, 2, 3] -> ["foo", None, *[1, 2, 3]] |
These are not false positives...
opened #39025 for one of the cases |
due to recent changes we have an additional mypy error
may need to revert #38018. further investigation (and code sample) on whether there was a regression |
The text was updated successfully, but these errors were encountered: