Repository navigation
Use __new__ instead of __init__ for some builtin classes - #4555
Conversation
This reverts commit 8e1ddd5.
|
@hauntsaninja There is something strange going on with the mro here, see the comment in the stubtest whitelist. In my opinion, this special case (quirk in Python?) should be handled by stubtest (or mypy?), instead of putting the enums on the whitelist. What do you think? An alternative is to override |
|
I'm guessing that the Enum metaclass plunks a reference to |
|
|
I was a little worried about this PR, so I ran mypy_primer: Seems fine! |
Closes #4514 #2630 #2686
I tested this against our internal codebases and against the example in #1464 and it seems to works fine.