LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

pyright

Static type checker for Python

TLDR

Type check project
$ pyright
copy
Type check specific files
$ pyright [file.py]
copy
Watch for changes
$ pyright --watch
copy
Output in JSON
$ pyright --outputjson
copy
Show version
$ pyright --version
copy
Create config file
$ pyright --createstub [package]
copy

SYNOPSIS

pyright [options] [files...]

DESCRIPTION

pyright is a static type checker for Python. It analyzes Python code for type errors without running it, providing fast feedback in editors and CI pipelines.The tool implements the Python type system from PEP 484 and subsequent typing PEPs, offering strict checking and IDE integration.

PARAMETERS

--watch

Watch mode for changes.
--outputjson
JSON output format.
--project dir
Project root directory.
--pythonplatform platform
Target platform.
--pythonversion version
Target Python version.
--level level
Diagnostic level (basic, standard, strict).
--stats
Show performance statistics.
--verifytypes package
Verify package types.
--createstub package
Generate stub files.

CONFIGURATION

pyrightconfig.json

Project-level configuration for type checking strictness, include/exclude paths, Python version, and platform targeting.
pyproject.toml
Project configuration with a `[tool.pyright]` section supporting the same options as pyrightconfig.json.

INSTALL

sudo pacman -S pyright
copy
brew install pyright
copy
nix profile install nixpkgs#pyright
copy

CAVEATS

Requires type annotations for full benefit. Some dynamic patterns hard to type. Configuration needed for complex projects. Not all libraries have type stubs.

HISTORY

Pyright was developed by Microsoft and released in 2019. It powers Python language support in VS Code through Pylance. Written in TypeScript, it focuses on performance and standards compliance.

SEE ALSO

mypy(1), python(1), pylint(1), flake8(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid