Skip to content

CLEAN: Use typing_extensions.override #1447

@Dr-Irv

Description

@Dr-Irv

Throughout the stubs, we have ignores for overrides that we know are valid. We can use @override when we know that the override is correct.

Have to look for:

# type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride]

What I'm not sure of is that for places where mypy complains but pyright does not, if we include @override, whether pyright will complain saying something like it's an unnecessary override.

Should import override from typing_extensions, since it was introduced in python 3.12

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions