Pyright Python Type Checker

Pyright Python Type Checker

github.com

2

About this website

Pyright is a fast type checker for the Python programming language, designed for use by both developers and tools. Created by Microsoft and maintained by Eric Traut, Pyright powers the Pylance extension for VS Code and has become the standard static type checking tool for Python. Key features: high-performance C++ implementation providing fast type analysis for large Python codebases, significantly faster than mypy (written in Python). Full PEP 484 type hint support including generics, protocols (structural subtyping), literal types, TypedDict, callable types, and variadic generics. Gradual typing allowing incremental adoption of type hints with Any as an escape hatch, making it practical for existing untyped codebases. Strict mode for maximum type safety and reportWarnings for controlling the level of diagnostics. Symbolic execution for detecting unreachable code, unused imports, and duplicate code paths. Cross-module analysis understanding import graphs, re-exports, and namespace packages for whole-project type checking. Configuration via pyproject.toml, pyrightconfig.json, and command-line options for fine-grained control of include and exclude paths. Import discovery for resolving both first-party and third-party imports with stub file (PEP 561) support. Watch mode for real-time re-analysis on file changes, providing instant feedback during development. CLI tool for CI/CD integration and batch type checking. JSON output for integration with other tools and editors. Pylance integration in VS Code providing rich IntelliSense, signature help, hover types, and type-driven auto-imports. Plugin architecture for custom type stubs and runtime type checking integration. Supports Python 2.7 and 3.x codebases. Cross-platform on Windows, macOS, and Linux. Open source under MIT license.

Tags & Categories

Statistics

2
Views
0
Clicks
0
Like
0
Dislike

Comments

Log In to post a comment

No comments yet. Be the first!