talira

An extremely fast Python type checker and language server, written in Rust

open sourceMITself-hostablefree

ty is a Python type checker and language server from Astral, the makers of uv and Ruff, written in Rust and 10 to 100 times faster than mypy and Pyright. ty check reports diagnostics with rich context, with configurable rule levels, per-file overrides, suppression comments and first-class project support, and it's designed for adopting on existing code, supporting redeclarations and partially typed code. Its type system has first-class intersection types, advanced narrowing and reachability analysis. The language server gives editors navigation, completions, code actions, auto-import, inlay hints and hover help with fine-grained incremental analysis, with integrations for VS Code, PyCharm and Neovim. It's in beta (0.0.x versions without a stable API) and MIT licensed.

Problems it solves

  • type check a large Python codebase much faster than mypy or Pyright
  • a fast Python language server for completions and go-to-definition in my editor
  • add type checking to an existing partially typed Python project gradually
  • catch Python type errors in CI quickly
  • configure which Python type errors are errors, warnings or ignored per file
  • get type errors as I type in VS Code, PyCharm or Neovim without lag

Features

  • 10x-100x faster than mypy and Pyright
  • diagnostics with rich contextual information
  • configurable rule levels, per-file overrides and suppression comments
  • support for redeclarations and partially typed code
  • intersection types, advanced type narrowing and reachability analysis
  • language server with navigation, completions, code actions, auto-import, inlay hints and hover
  • fine-grained incremental analysis in the editor
  • VS Code, PyCharm and Neovim integrations
  • online playground
  • install with uv, pip, pipx, a standalone installer or Docker

Limitations

  • Beta: ty uses 0.0.x versions without a stable API, so diagnostics and behaviour can change between any two versions

Capabilities

Has a command line toolplan not known

Alternatives

The same job

These do what ty does.

  1. Pyright Static type checker for Python
  2. mypy Optional static typing for Python
  3. Pylance A performant, feature-rich language server for Python in VS Code
  4. Sorbet A fast, powerful type checker designed for Ruby
  5. TypeScript JavaScript with static types, compiled to plain JavaScript
  6. Steep Gradual typing for Ruby

Compare ty with the top 3