talira

basedpyright

A fork of Pyright with stricter type checking rules, Pylance features in any editor and a PyPI package

open sourceMITfree

Forked from Pyright.

A static type checker and language server for Python, forked from Pyright, that merges each new Pyright release within a day and adds its own changes: many new diagnostic rules, all enabled by default; a baseline so an existing project can adopt the stricter rules without changing old code; and features of Pylance, Microsoft's closed-source VS Code extension, reimplemented for any editor. It installs from PyPI without Node.js, and its VS Code extension uses the same version as the CLI. MIT licensed.

Problems it solves

  • get stricter Python type checking than Pyright gives me
  • use Pylance-style features in an editor other than VS Code
  • add strict type checking to an old Python project without fixing every error first

Features

  • Pyright's type checking, merged from each Pyright release
  • many extra diagnostic rules, all on by default
  • baseline for adopting strict rules in an existing project
  • Pylance features in any editor
  • installs from PyPI without Node.js

What this fork adds

  • Adds many new diagnostic rules and enables all rules by default Offered upstream issue
  • Adds a baseline so existing code can adopt stricter rules without being changed Not known whether it was offered upstream
  • Reimplements Pylance-only features for any editor Not known whether it was offered upstream
  • Ships on PyPI so it installs without Node.js Not known whether it was offered upstream

Alternatives

The same job

These do what basedpyright does.

  1. Pyright Static type checker for Python
  2. ty An extremely fast Python type checker and language server, written in Rust
  3. Pyrefly A fast type checker and language server for Python, written in Rust
  4. Pylance A performant, feature-rich language server for Python in VS Code
  5. mypy Optional static typing for Python

Compare basedpyright with the top 3