mypy invalid syntax in python version 3.11 and earlier
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 250
- Forks
- 36
- PR merge metrics
- No merged PRs in 30d
Description
The file https://github.com/rnag/dataclass-wizard/blob/main/dataclass_wizard/utils/object_path.pyi uses the new syntax defined in PEP695 which adds the generic type alias. This new alias was added for python 3.12 and as such causes syntax errors in mypy when checking using python version 3.11 or earlier
Repro:
Python version: 3.11.13
mypy version: 1.17.1
dataclass-wizard version: 0.35.1
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 dataclass_wizard/utils/object_path.pyi and reproduce the reported mypy check using Python 3.11.13 and mypy 1.17.1. Review the PEP 695 syntax in that file and verify that the compatibility issue is resolved for Python 3.11 and earlier without breaking the type stub.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100