Microsoft Introduces Open-source Static Type Checker for Python

0
237

Pyright currently provides support for Python 3.0 and its newer versions only.

Microsoft has released Pyright, an open-source static type-checking tool for the Python programming language.

It is claimed that Pyright can run five times faster than other existing type checkers written in Python, such as Mypy, Pytype and Pyre.

 

Microsoft said the tool also runs faster than its own Python Language Server, which offers some overlapping features.

Pyright is written in Typescript and runs on Node.js, meaning it does not require a Python environment or imported third-party packages to be installed.

It is intended for large Python source bases and can perform fast incremental updates when files are modified.

Type Checking Features

The tool supports flexible configuration, providing granular control over settings.

Users can set up different execution environments for different subsets of a source base, each of which can use different module search paths, Python language versions and target platforms.

Pyright supports features such as type hints, variable notation and structural subtyping.

It can be used as a Language Server Protocol plugin for Microsoft’s Visual Server Code source-code editor or can be run as a stand-alone command-line tool, Microsoft said.

Limitation

Pyright currently provides support for Python 3.0 and its newer versions only. Microsoft said it has no plan to support older versions as of now.

It added, “Pyright is a work in progress. Type-checking capabilities are not fully implemented.”

LEAVE A REPLY

Please enter your comment!
Please enter your name here