Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Pyright-alright

PyPI Supported python versions

The pyright type checker, packaged for Python 🍞 + 🐍 + 🪨 = 🚀

Pyright is a full-featured, standards-based static type checker for Python. It is designed for high performance and can be used with large Python source bases.

The pyright-alright Python package is a self-contained command-line wrapper over pyright that works out of the box: no need to install node.

Installation

Use the package manager of your choice to install pyright-alright.

Here is a simple example with pip:

pip install pyright-alright

Usage

Command line

pyright --version

# Alternatives
pyright-alright --version
pyright_alright --version

Run library module as a script

python -m pyright_alright --version

As a pre-commit hook

repos:
  - repo: local
    hooks:
      - id: pyright
        name: Run pyright
        entry: pyright
        language: system
        types: [file, python]

Documentation

To configure and use pyright properly, you should take time to read the Pyright documentation.

Motivation

TL;DR: self-contained, no runtime installation under the hood, no network calls, no warnings, just a pyright CLI.

Pyright is written in Typescript therefore it requires us to install a Javascript package manager (ex: npm) and a Javascript Runtime (ex: node) to make it work.

It also makes it not possible to track the pyright's version of a project in your pyproject.toml or your requirements.txt like any other dependencies.

There is already pyright-python, a community-maintained command-line wrapper over pyright, which works well but it has drawbacks.

Until until recently it required to either have node installed or it would automatically download node when running the CLI for the first time.

This default behaviour led to annoying bugs in my company's CI server.

Moreover, it prints a warning every time it detects that that a new version is available which I find to be an annoying default configuration.

$ pyright
WARNING: there is a new pyright version available (v1.1.371 -> v1.1.384).
Please install the new version or set PYRIGHT_PYTHON_FORCE_VERSION to `latest`

pyright-alright is not a revolution at all but provides good defaults:

  • No need to install npm/nodejs thanks to pybun which packages the bun Javascript runtime to make pyright works
  • No installation or network calls is done when running the CLI
  • No unwanted warnings about new pyright version available
  • Just a working pyright CLI

License

pyright-alright itself is released under The Unlicense license.

pyright has its own licence.

Metadata

Release files for pyright-alright 1.1.371a1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for pyright-alright 1.1.371a1
File Interpreter ABI Platform
pyright_alright-1.1.371a1-py3-none-any.whl Python 3 none any Details

Release files / pyright_alright-1.1.371a1-py3-none-any.whl

Download URL pyright_alright-1.1.371a1-py3-none-any.whl
Size 5.6 MB
Tags Python 3
SHA-256 checksum
How to use checksums
06c2f28d5c9ffacec23b932db2a1c1ce7257a59d0230e3908a7b5ed635f1fa0a
BLAKE2b-256 checksum
How to use checksums
77816e4ae0daadf216f630327693de1c85667b1b0f56209b344612039e279324
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.12.7 Linux/6.8.0-1015-azure
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page