We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This is based on a bug report that someone just filed against pyright. Mypy appears to have the same bug.
The enum documentation indicates that an attribute with a private (mangled) name is not treated as an enum member.
from enum import Enum class MyEnum(Enum): A = 1 B = 2 C = 3 __my_dict = {A: "ham", B: "spam", C: "egg"} # Should reveal `dict[MyEnum, str]`, not `Literal[MyEnum.__my_dict]` reveal_type(MyEnum.__my_dict)
The text was updated successfully, but these errors were encountered:
Enum private attributes are not enum members (#17182)
ba6febc
Fixes #17098
Successfully merging a pull request may close this issue.
This is based on a bug report that someone just filed against pyright. Mypy appears to have the same bug.
The enum documentation indicates that an attribute with a private (mangled) name is not treated as an enum member.
The text was updated successfully, but these errors were encountered: