-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Bug: Functional Enum API Unexpected arguments to Enum() #9079
Comments
This should work if you use positional instead of keyword arguments. For example, the mypy test suite contains a |
Okay great, I understand that specifically not being implemented. The unnamed arguments will do as a workaround for now, solves my use case. |
hi, @JukkaL @JelleZijlstra I want to fix this issue, could you please give some suggestions about where to start? |
@LiuYuHui you can add new test cases to the |
I am having the same issue. |
I get error
When mypy checking for example
I'm using mypy 0.782 and Python 3.8.3. Also tried latest master (0.790+dev.eae1860bef0a6fe06753459bf97633a41e789ed7)
Since this is valid python3 syntax, I would expect mypy to at least let it through, maybe with a warning about dynamic types being impossible to infer at static typecheck time.
For my actual use case, I could try using the class EnumName(Enum)): form but It doesn't fully support my use case, because I would like to use names containing spaces and special symbols.
The text was updated successfully, but these errors were encountered: