.. | ||
images | ||
schemas | ||
src | ||
typeshed-fallback | ||
CHANGELOG.md | ||
package-lock.json | ||
package.json | ||
README.md | ||
tsconfig.json |
Static type checker for Python
Speed
Pyright is a fast type checker meant for large Python source bases. It can run in a “watch” mode and performs fast incremental updates when files are modified.
No Dependency on Python Environment
Pyright does not require a Python environment or imported third-party packages to be installed.
Configurability
Pyright supports configuration files that provide granular control over settings. Different “execution environments” can be associated with subdirectories within a source base. Each environment can specify different module search paths, python language versions, and platform targets.
Type Checking Features
Pyright supports:
- PEP 484 type hints including generics
- PEP 526 syntax for variable annotations
- PEP 544 structural subtyping
- Type inference for function return values, instance variables, class variables, and globals
- Smart type constraints that understand conditional code flow constructs like if/else statements
Built-in Type Stubs
Pyright includes a recent copy of the stdlib type stubs from Typeshed. It can be configured to use another (perhaps more recent or modified) copy of the Typeshed type stubs. Of course, it also works with custom type stub files that are part of your project.
For more details, refer to the README on the Pyright GitHub site.