Skip to content

TYP: Use stubtest to ensure consistency with pyi files #47760

Closed
@hauntsaninja

Description

@hauntsaninja

Problem Description

Currently it's possible for stub files (pyi) to become out of date with the implementation (pyx, py)
pandas-dev/pandas-stubs#33 (comment)

Feature Description

stubtest is a tool that is shipped with mypy that can help compare the runtime implementation with what it finds in the stubs. For example, it found these issues (along with several others):
#47756
#47758

Alternative Solutions

I'm not aware of other tools that would work for this use case.

Additional Context

cc @twoertwein

Metadata

Metadata

Assignees

No one assigned

    Labels

    EnhancementNeeds TriageIssue that has not been reviewed by a pandas team memberTypingtype annotations, mypy/pyright type checking

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions