Skip to content

Pyright

Pyright is a full-featured, standards-compliant static type checker for Python, designed for high performance with large Python source bases.

Freemium · Python, Visual Studio Code

Pyright in short

Pyright delivers high-performance static type checking for Python, but its real-time diagnostics shine brightest within VS Code.
stork
I am a flat drawing.
One flat drawing and one typed sentence.
This drawing was never animated.
A photo, a cartoon, a painting or a 3D character. From 10 cents a minute. Free to try.
Make a photo talkDevelopers: there is an API

What is Pyright?

Pyright is a static type checker tool developed by Microsoft that enables Python developers to identify type errors before code execution. It is designed for high performance and standards compliance, particularly with large Python source bases. Pyright performs static analysis of Python code, leveraging type annotations to detect mismatches, unsafe None access, and invalid assignments. It operates as both a command-line tool for CI/CD integration and a language server that powers Microsoft's Pylance extension for Visual Studio Code, offering real-time diagnostics, semantic highlighting, and smart imports. Its core function is to enhance code quality and developer productivity by catching type-related bugs early.

Key Features of Pyright

Pyright offers a comprehensive set of features tailored for robust static type checking in Python environments, emphasizing performance and standards adherence. Its capabilities extend from fundamental type error detection to advanced IDE integration, supporting modern Python development workflows.

  • Standards-compliant static type checking for Python code, adhering to PEPs.
  • High-performance type checking optimized for analyzing large Python source bases efficiently.
  • Command-line tool for integration into CI/CD pipelines, enabling pre-merge type error detection.
  • Visual Studio Code extension (Pylance) for integrated, real-time diagnostics, semantic highlighting, and smart imports.
  • Detection of type mismatches, unsafe None access, and invalid assignments within code.
  • Support for gradual typing adoption, allowing teams to progressively introduce stricter type rules.
  • Regular updates to bundled Typeshed stub files for the Python standard library and common packages.
  • Enhanced diagnostic rules, including reportMissingTypeArgument and checks for metaclass conflicts.
  • Improved completion suggestions within IDEs, distinguishing properties from other methods.

Who Should Use Pyright?

Pyright is primarily designed for Python developers and teams who prioritize code quality, early bug detection, and efficient development workflows. Its performance and integration capabilities make it suitable for various project sizes and development methodologies.

  • Python developers seeking early detection of type-related bugs before code execution.
  • Teams aiming to enforce code quality and clean API design through rigorous type correctness.
  • Developers using Visual Studio Code who benefit from integrated, real-time type checking and rich IntelliSense.
  • Organizations managing large Python codebases that require high-performance static analysis to maintain code health.
  • Projects adopting gradual typing, allowing for a phased introduction of type hints and stricter type-checking rules.

Pyright Pricing & Plans

Pyright operates under a freemium model. The core Pyright static type checker, including its command-line tool and the underlying technology for the Pylance Visual Studio Code extension, is provided free of charge. There are no paid tiers, subscription plans, or usage-based fees associated with Pyright itself. Its development is supported by Microsoft as an open-source project.

Pyright vs Competitors

Pyright competes within the ecosystem of Python static analysis tools, primarily against other type checkers and linters. Its key differentiators often revolve around performance, strictness, and deep IDE integration.

Pyright

Freemium · Python, Visual Studio Code

From the Stork blog

Enjoying this? Get one like it in your inbox each morning.

one email a day · unsubscribe in two clicks · no third-party tracking