Lightning-AI/pytorch-lightning

Adopt `typing_extensions.Override`

Open

#18,695 opened on 2023年10月3日

GitHub で見る
 (25 comments) (0 reactions) (1 assignee)Python (3,233 forks)batch import
featuregood first issuehelp wanted

Repository metrics

Stars
 (26,687 stars)
PR merge metrics
 (平均マージ 9d 15h) (30d で 3 merged PRs)

説明

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

コントリビューターガイド