ty: Extremely Fast Python Type Checker

0.0.28 · active · verified Sun Apr 05

ty is an extremely fast Python type checker and language server, written in Rust. It aims to provide comprehensive diagnostics and real-time editor integration, offering significantly faster performance compared to other Python type checkers. Currently in beta/preview, it is under active and rapid development with frequent releases, typically multiple times a week.

Warnings

Install

Imports

Quickstart

Save the code above as `main.py`. Then, run `ty check` from your terminal in the same directory. ty will analyze the file and report the type error. Ensure `ty` is installed or run with `uvx`.

import typing

def greet(name: str) -> str:
    return "Hello, " + name

# Intentional type error for demonstration
result: int = greet("World") 

view raw JSON →