- Category
- Developer Tools
- Rank
- No. 217Tools index
- Pricing
- Open Source
- Type
- TOOL
- Builder
- microsoft
- GitHub
- 15.6k stars
- Latest release
- 1.1.412
- Date
About
Microsoft's fast static type checker for Python — also powers the Pylance language server in VS Code.
What it does
Pyright analyzes Python source without executing it, finding type problems through annotations, inference, import resolution, and code-flow understanding. It runs from the command line, watches files for incremental updates, or supplies editor features through its language server.
Why it's ranked here
Pyright is a strong choice for large, typed Python codebases. Its documented strengths align with daily engineering work: incremental checking, granular diagnostics, multiple execution environments, broad typing-standard coverage, and editor navigation. The repository also shows dedicated testing and type-checking workflows.
What's good
Configuration can vary module paths, Python versions, and target platforms by subdirectory. Teams can adopt stricter checks per file, suppress individual diagnostic categories, and detect obsolete suppressions. Bundled standard-library stubs reduce setup, while custom stubs and alternate stub collections remain supported.
Tradeoffs
Pyright supports Python 3.0 and newer, with no planned support for older versions. Its many modes, diagnostic overrides, execution environments, and comment controls create configuration choices teams must govern. Some listed typing proposals remain experimental, so relying on those features carries extra uncertainty.
How to use it well
Use it for typed Python projects that need quick local feedback and repeatable command-line checks in continuous integration. Watch mode suits active development, while the language server adds completion, navigation, renaming, and import organization. Keep runtime tests alongside it, because static analysis checks types rather than executed behavior.
Technical notes+
The root package.json defines a private npm and Lerna workspace with TypeScript, ESLint, Prettier, build, lint, and type-check scripts. packages/pyright/index.js is a Node CLI shim that sets global.__rootDirectory and loads the bundled analyzer. packages/vscode-pyright/src/server.ts starts the VS Code server with one worker. packages/pyright-internal/src/server.ts builds PyrightServer around LanguageServerBase, import resolution, file watching, background analysis, cancellation, caching, and configurable diagnostics. packages/pyright-internal/src/typeServer/server.ts adds Type Server Protocol queries, notebook URI mapping, and a shared type cache. packages/pyright-internal/jest.config.js targets tests under src/tests and supports full type checking or a CI transpile-only path.
Observed
- License
- MIT license
- Primary implementation language
- TypeScript, with JavaScript entry points and tooling
- Packaging and build surface
- Private npm and Lerna monorepo with Node-based CLI bundling
- Interfaces
- Command-line tool, language server, Visual Studio Code extension, and browser playground
- Python compatibility
- Analyzes Python 3.0 and newer; older versions are not planned
- Testing structure
- Jest is configured for TypeScript and TSX tests under the internal package test tree
Read from README.md, package.json, packages/pyright/index.js, packages/pyright-internal/debug.js, packages/pyright-internal/jest.config.js, packages/vscode-pyright/src/server.ts, packages/pyright-internal/src/server.ts, packages/pyright-internal/src/typeServer/server.ts, docs/README.md, docs/_navbar.md, docs/_sidebar.md, docs/builtins.md, docs/commands.md, docs/comments.md, docs/features.md.
What it can do
Check Python code for type errors
Python source code files → Type error reports and diagnostics
Infer types for untyped Python code
Python code without explicit type annotations → Inferred type information
Validate type annotations against actual code usage
Python files with type hints → Type consistency validation results
Provide code completion suggestions
Partial Python code and cursor position → List of relevant code completion options
Generate hover information for code symbols
Python code symbol and position → Type information and documentation
Find symbol definitions and references
Python symbol name and codebase → Location of symbol definition and all references
Analyze import dependencies
Python project files → Import resolution status and missing module reports
Tags
Tech Stack
Comments (0)
No comments yet
Editorially curated, with community endorsements as a secondary signal. Corrections welcome.
