Lightning-AI / Lightning-AI/pytorch-lightning
Adopt `typing_extensions.Override`
Open
@sartq333 is already working on this.
Since Oct 5, 2023.
feature
good first issue
help wanted
- Dominant language
- Python
- Stars
- 31.4k
- Forks
- 3.8k
- Avg merge
- 6d 7h
- Merged PRs (30d)
- 6
Description
Description & Motivation
We use overrides heavily.
Python 3.12 added support for this. See https://peps.python.org/pep-0698/
Mypy should support it: https://github.com/python/mypy/issues/14072
Pitch
Use https://typing-extensions.readthedocs.io/en/latest/#override in our overrides classes.
Using this would require increasing the minimum typing_extensions to 4.4: https://github.com/Lightning-AI/lightning/blob/master/requirements/fabric/base.txt#L8
Alternatives
No response
Additional context
No response
cc @borda
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.
Assessment
This issue has not been assessed yet.