-
Notifications
You must be signed in to change notification settings - Fork 771
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
False positive for: list((1,2))+[3,] #487
Comments
list((1,2))+[3,]
I think this is somewhat expected; the first list is inferred to be If you write the following, it type checks: x: List[int] = list((1,2))
y = x + [3,] |
@jakebailey, I'll take a deeper look at this one. The expression |
I've improved the bidirectional type inference for tuple expressions. The logic is now smarter about when to honor literals and when to strip them. This will be included in the next release of pylance. |
This issue has been fixed in version 2020.10.2, which we've just released. You can find the changelog here: https://github.com/microsoft/pylance-release/blob/master/CHANGELOG.md#2020102-21-october-2020 |
Environment data
Expected behaviour
No red squiggle under the expression:
list((1,2))+[3,]
Actual behaviour
Red squiggle with message:
Also not sure why the message is duplicated?
Logs
Code Snippet / Additional information
XXX
The text was updated successfully, but these errors were encountered: