Lightning-AI/pytorch-lightning

Adopt `typing_extensions.Override`

オープン

#18,695 opened on 2023/10/03

 (25 件のコメント) (0 件のリアクション) (1 人の担当者)Python (3,233 件のフォーク)batch import
featuregood first issuehelp wanted

Repository metrics

Stars
 (26,687 個のスター)
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

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