Make stubtest handle `__new__` in Enums
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 20.6k
- Forks
- 3.3k
- PR merge metrics
- PR metrics pending
Description
See https://github.com/python/typeshed/actions/runs/7606392260/job/20712113127?pr=11299 / https://github.com/python/typeshed/pull/11299 / https://github.com/python/typing-council/issues/11
stubtest doesn't handle this case correctly. The logic I had is simplistic:
https://github.com/python/mypy/blob/1fd29ac54a2135ec1d1d30289c625d12e6198eac/mypy/stubtest.py#L1092
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the stubtest logic referenced at mypy/stubtest.py#L1092 and review the linked typeshed action run, pull request 11299, and typing-council issue 11 for the failing Enum new case. Confirm the expected behavior from those references and verify that stubtest handles Enum new correctly without regressing existing checks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100