-
-
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
Too many arguments for IntEnum reported #8344
Comments
Yeah, it looks like the checks in https:/python/mypy/blob/master/mypy/semanal_enum.py#L99 are too strict. If you're feeling up for submitting a PR, I think it would probably be good enough relax the checks so they make sure there are only two positional arguments, not just two arguments in total, and that the keyword arguments all have the right names -- see And if you also feel like checking the type, we can probably get away with insisting the user always uses an int literal for start. (Supporting arbitrary variables is tricky, since we special-case handling enums before the type checking phase). Not sure if it's worth trying to support the other keyword arguments though, especially module and qualnames: idk what mypy would do with them. |
@JukkaL is this a feature or a mypy bug? Can i submit a PR for this? |
hi bro @rahulrj are you working on it... |
If nobody is assigned for this issue, I would like to work on it. |
I am not working on this @mridullpandey |
hi @swetavooda i have did some sort of modifications on it,will you please take another one ..pls let me know asap thanks :-) |
@Michael0x2a will you please elaborate it what to actually do |
@mridullpandey If you are really willing to work on this, you may continue. I'll find another issue to work on. |
Merge pull request #8436. Hopefully that would fix the issue. |
then why this is still alive |
@mridullpandey Because it hasn't been reviewed yet. Once the PR is reviewed by the collaborator, only then can the issue be closed. The PR has passed the tests as well. |
What's the status on this one? |
This seems to have been already fixed in #9123 |
Indeed, closing this issue |
If I define the following
IntEnum
:mypy throws the following lint error:
Too many arguments for IntEnum()
.The
start
parameter is an official methods:https://docs.python.org/3/library/enum.html
The text was updated successfully, but these errors were encountered: