Skip to content

tracker: use faster type checker (pyrefly / ty / zuban) in CI #27049

@MarcoGorelli

Description

@MarcoGorelli

Polars currently uses mypy for type-checking, but it's a bit slow on a codebase of this size (~1 minute)

Pyrefly takes about 1-2 seconds on my laptop, and it is a bit stricter on some things. ty is similar.

Before being able to introduce either of them, quite a few type issues which mypy doesn't flag need addressing. I'm looking into this. There's also a few issues which need addressing upstream - I'll report things as and when I find them

So, here's a tracking issue that I'll reference in such PRs


Both pyrefly and ty are quite new, so I'm not sure I'd suggest completely removing mypy for the time being. Personally I don't see the harm in running multiple type checkers in CI, especially if some are quite fast


pyrefly issues uncovered as a result of this:


precursor PRs:


relevant issues:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions