New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

pyright

Package Overview
Dependencies
Maintainers
1
Versions
476
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pyright - npm Package Compare versions

Comparing version 1.0.9 to 1.0.11

2

package.json

@@ -5,3 +5,3 @@ {

"description": "Type checker for the Python language",
"version": "1.0.9",
"version": "1.0.11",
"license": "MIT",

@@ -8,0 +8,0 @@ "author": {

@@ -26,9 +26,9 @@ ![Pyright](/docs/img/PyrightLarge.png)

### Command-line Tool or VS Code Extension
Pyright includes both a [command-line tool](/docs/command-line.md) and a [Language Server Protocol](https://microsoft.github.io/language-server-protocol/) plugin for VS Code.
### Command-line Tool or Visual Studio Code Extension
Pyright includes both a [command-line tool](/docs/command-line.md) and an [extension for Visual Studio Code](https://github.com/Microsoft/pyright) that implements the [Language Server Protocol](https://microsoft.github.io/language-server-protocol/).
For rich Python editing and debugging cabailities with Visual Studio Code, be sure to also install the official [Microsoft Python extension for Visual Studio Code](https://marketplace.visualstudio.com/itemdetails?itemName=ms-python.python) as Pyright only provides syntax and type checking.
## Documentation
* [Getting Started](/docs/getting-started.md)
* [Getting Started with Type Checking](/docs/getting-started.md)
* [Command-line Options](/docs/command-line.md)

@@ -48,25 +48,32 @@ * [Configuration](/docs/configuration.md)

## FAQ
**Q:** What is the difference between pyright and the [Microsoft Python VS Code plugin](https://github.com/Microsoft/vscode-python)?
**Q:** What is the difference between pyright and the [Microsoft Python Visual Studio Code plugin](https://github.com/Microsoft/vscode-python)?
**A:** The Python VS Code plugin is the official Python support extension for VS Code. It is officially supported by a team of engineers at Microsoft. It supports a diverse array of features including debugging, linter plugins, type checking plugins, and much more. Pyright is focused entirely on type checking. It is a side project with no dedicated team.
**A:** Pyright is focused on type checking. The Python VS Code plugin is Microsoft’s officially-supported extension for VS Code and provides a diverse array of features including auto-complete, debugging, linter plugins, type-checking plugins, and much more. Pyright can be used alongide the Microsoft Python extension.
**Q:** What is the difference between Pyright and the [Microsoft Python Language Server](https://github.com/Microsoft/python-language-server)?
**Q:** What is the difference between pyright and the [Microsoft Python Language Server](https://github.com/Microsoft/python-language-server)?
**A:** The Microsoft Python Language Server is a [language server protocol (LSP)](https://microsoft.github.io/language-server-protocol/) implementation that works with the Microsoft Python VS Code plugin. It is officially supported by a team of Microsoft engineers. It focuses on providing core editing capabilities such as auto-completion, code navigation and documentation. Pyright is focused on providing fast syntax and type checking with features such as more configurabilty and command-line execution.
**A:** The Microsoft Python Language Server is a [language server protocol (LSP)](https://microsoft.github.io/language-server-protocol/) implementation that works with the Microsoft Python VS Code plugin, and it is officially supported by a team of Microsoft engineers. It also provides type checking capabilities. Pyright provides overlapping functionality but includes some unique features such as more configurabilty, command-line execution, and better performance.
**Q:** What is the long-term plan for Pyright?
**A:** Pyright is a side project with no dedicated team. There is no guarantee of continued development on the project. If you find it useful, feel free to use it and contribute to the code base.
## Installation
You can install the latest-published version of the Pyright VS Code extension directly from VS Code. Simply open the extensions panel and search for `pyright`.
The latest version of the command-line tool can be installed with npm:
`npm i pyright`
The latest version of the command-line tool can be installed with npm. To install it globally:
`npm install -g pyright`
To install it globally:
`npm i -g pyright`
On MacOS or Linux, sudo is required to install globally:
`sudo npm install -g pyright`
To run the command-line tool:
`npx pyright <options>`
Once installed, you can run the tool from the command line as follows:
`pyright <options>`
To update to the latest version:
`sudo npm update -g pyright`
## TODO

@@ -76,6 +83,4 @@

* Validate that all abstract methods are overridden
* Type analysis support for generators
* Type analysis support for coroutines
* Type analysis support for async functions and lambdas
* Support for old-style type annotations within comments

@@ -87,7 +92,5 @@ * Address the many TODO comments in the code

* Validate that overridden methods in subclass have same signature as base class methods
* Verify that exception classes inherit from base Exception
* Add support for inference of subclass type vars based on method parameter types declared in subclass
* Validate consistency of subclass type vars across all declared methods
* Add support for type hints on var-arg parameters
* Add support for NoReturn type
* Add handling of set, get and delete for expressions
* Flag assignments to read-only values (`None`, `True`, `False`, `__debug__`) as errors

@@ -100,12 +103,6 @@ * Revamp support for properties - model with Descriptor protocol, detect missing setter

This project welcomes contributions and suggestions. Most contributions require you to agree to a
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
the rights to use your contribution. For details, visit https://cla.microsoft.com.
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide
a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions
provided by the bot. You will only need to do this once across all repos using our CLA.
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc