Understanding python.analysis.pyrightVersion in Pylance
June 23, 2026 · View on GitHub
Pylance is a fast and feature-rich language server extension for Python in Visual Studio Code, powered by the Pyright static type checker.
The python.analysis.pyrightVersion setting lets you pin the version of Pyright that Pylance uses to produce diagnostics.
What is python.analysis.pyrightVersion?
Pylance is built on the Pyright type checker. This setting lets you select a specific Pyright version for diagnostics rather than the version bundled with your installed Pylance.
This is useful when you need diagnostics to match a particular Pyright release — for example, to align editor results with a Pyright version used in CI, or to validate behavior against a specific build.
Important: This setting only takes effect when
python.analysis.diagnosticsSourceis set toPyright.
Type: string
Default: "" (use the bundled Pyright version)
Scope: resource (can be set per workspace or folder)
Minimum supported version: 1.1.397
Accepted values
The value can be either of the following:
- A version string, for example
1.1.397. - A path to a local
pyright-langserver.jsfile. The referenced build must also be version1.1.397or higher.
How to Change python.analysis.pyrightVersion
Using the Settings UI
- Open the Command Palette (
Ctrl+Shift+P/Cmd+Shift+P) and run Preferences: Open Settings (UI). - Search for
python.analysis.pyrightVersion. - Enter a version string or a path.
Using settings.json
Pin to a published version:
{
"python.analysis.diagnosticsSource": "Pyright",
"python.analysis.pyrightVersion": "1.1.397"
}
Use a local build:
{
"python.analysis.diagnosticsSource": "Pyright",
"python.analysis.pyrightVersion": "/path/to/pyright-langserver.js"
}
When to Use It
- Set a version when you need diagnostics to match a specific Pyright release, such as the one used in your continuous integration pipeline.
- Leave empty (the default) to use the Pyright version bundled with your Pylance installation.
Related Settings
- The
python.analysis.diagnosticsSourcesetting selects which engine produces diagnostics;pyrightVersionapplies only when it is set toPyright. python.analysis.typeCheckingMode— controls how strict diagnostics are.
For more information on Pylance settings and customization, refer to the Pylance Settings and Customization documentation.
This document was generated with the assistance of AI and has been reviewed by humans for accuracy and completeness.