Skip to content

TYP: RangeIndex._constructor #43387

Closed
@twoertwein

Description

RangeIndex._constructor returns Type[Int64Index] but it is supposed to return the current type of the class itself (Type[RangeIndex]) .

pandas/core/indexes/range.py:179: error: Return type "Type[Int64Index]" of "_constructor" incompatible with return type "Type[RangeIndex]" in supertype "Index" [override]

Found by declaring cache_readonly = property.

Metadata

Assignees

No one assigned

    Labels

    Typingtype annotations, mypy/pyright type checking

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions