Skip to content

Adopt typing_extensions.Override #18695

@carmocca

Description

@carmocca

Description & Motivation

We use overrides heavily.

Python 3.12 added support for this. See https://peps.python.org/pep-0698/

Mypy should support it: python/mypy#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

Metadata

Metadata

Assignees

Labels

featureIs an improvement or enhancementgood first issueGood for newcomershelp wantedOpen to be worked on

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions