Lightning-AI/pytorch-lightning

Adopt `typing_extensions.Override`

Open

#18.695 geöffnet am 3. Okt. 2023

Auf GitHub ansehen
 (25 Kommentare) (0 Reaktionen) (1 zugewiesene Person)Python (3.233 Forks)batch import
featuregood first issuehelp wanted

Repository-Metriken

Stars
 (26.687 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 9T 15h) (3 gemergte PRs in 30 T)

Beschreibung

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