Skip to main content

Run Pyright and enforce minimum type coverage

Project description

Pyright-cov

Enforce minimum type coverage!

pyright-cov is a tool which you can use to enforce minimum type coverage in your projects.

image

Installation

pip install pyright-cov

Usage

In a virtual environment in which you have a local install of a library foo, you can ensure that foo is type-complete with:

pyright-cov --verifytypes foo --ignoreexternal

This will fail (i.e. exit 1) if your type coverage is less than 100%. To set a lower threshold, such as 60%:

pyright-cov --verifytypes foo --ignoreexternal --fail-under 60

To exclude symbols whose names match a given (glob) pattern, use --excludelike, for example:

pyright-cov --verifytypes foo --ignoreexternal --excludelike "*.tests.*"

Additional command-line flags are passed to Pyright.

Used by

Testing

Make sure you have uv and pytest installed. Then, run:

pytest tests

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyright_cov-0.2.1.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyright_cov-0.2.1-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file pyright_cov-0.2.1.tar.gz.

File metadata

  • Download URL: pyright_cov-0.2.1.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pyright_cov-0.2.1.tar.gz
Algorithm Hash digest
SHA256 6489ac0f99ee575ac83c6664317ad6da20fb6326230130695311bd9d260dc590
MD5 4d93ac3dbe5da1704625cd8a9f2ab9cf
BLAKE2b-256 e1232897743e26f9539a1f9faa6a351c479ae57fca72fcc537fd1c02e0b93086

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyright_cov-0.2.1.tar.gz:

Publisher: publish_to_pypi.yml on MarcoGorelli/pyright-cov

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyright_cov-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: pyright_cov-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pyright_cov-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d9a3d1075918dbfa5d1a581aa7b4722d3c6b8277553c56e5befd4e12c8745ff9
MD5 04d84bf2f8a406e89d70b240e7e18da8
BLAKE2b-256 5bce42cceb91da1b765cb960c3ea0689fafe8ae9a4fce0006ac9f95da3a73390

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyright_cov-0.2.1-py3-none-any.whl:

Publisher: publish_to_pypi.yml on MarcoGorelli/pyright-cov

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page