Skip to content

Consider replacing mypy with ty #572

@samcunliffe

Description

@samcunliffe

As we get more experience using it, we can form an opinion on replacing mypy with ty in both the template and recommendation pages.

From a first pass on a large(ish) codebase with some type hints (and probably some typing bugs) they do not behave identically out of the box:

mypy .
# ...
Found 243 errors in 25 files (checked 63 source files)

vs.

uvx ty check --output-format concise
# ...
Found 63 diagnostics

The latter was indeed very fast. The first thing ty does is warn us:

WARN ty is pre-release software and not ready for production use. Expect to encounter bugs, missing features, and fatal errors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is neededinvestigateSome investigation is needed

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions