[1.14 regression] False positive on abstract Enum subclasses in stubs
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 20.6k
- Forks
- 3.3k
- PR merge metrics
- PR metrics pending
Description
While updating typeshed to mypy 1.14 (python/typeshed#13272), we got a few false positive errors on abstract enum classes like fpdf.enums.CoerciveEnum. This is due to the changes from #18068.
Perhaps we can throw the #18068 warning only if the enum class contains at least one attribute annotated with PEP 526 syntax. (cc @hauntsaninja as the author of #18068 and @tungol for the typeshed change.)
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 by reading the changes from #18068 and the linked typeshed PR discussion, then reproduce the false positive for abstract enum classes such as fpdf.enums.CoerciveEnum. The work is done when the warning no longer appears for enums without PEP 526 attributes while it remains for enums that have them.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100