-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
(馃悶) False positive error for list of two callables #13182
Comments
First of all, unions are unordered, and defining some metric for sorting names can become a lot more complex as the names get more complicated. Secondly, mypy is correct to give an error in your second example (which I'm not sure if it is related to the issue here of ordering names) as the following code:
would error. |
@ethanhs It's not that the error shouldn't be there, it's that the error is complaining about the first element in the list. I fixed this issue locally and that case is now reporting correctly, so I think they are related. |
The expression |
Updated the issue title to reflect the actual bug. |
@JelleZijlstra Do you think the original issue is valid? Should I re raise it |
Yes it's valid. We can use this issue to track it. |
They seem like completely different issues |
Your original post included two issues. The first was about unions, and that was already answered. Unions are not ordered, so that's not a bug. The second issue is a legitimate bug, and the title of this issue was changed to reflect that. |
This list is perfectly valid. only usages should be an error.
playground
The text was updated successfully, but these errors were encountered: