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

Additional command-line flags are passed to Pyright.

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.1.3.tar.gz (3.2 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.1.3-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyright_cov-0.1.3.tar.gz
  • Upload date:
  • Size: 3.2 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.1.3.tar.gz
Algorithm Hash digest
SHA256 402ee3e1729df2af7d0c161281567feadc01597f0c4a38bfa393a4f050609bd7
MD5 1b1159eb03fdb4e1f1710f260e096e92
BLAKE2b-256 2fd267371f68eadd859824c4a8e4bdf7902180eb5594640935c9a7628a49d099

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyright_cov-0.1.3.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.1.3-py3-none-any.whl.

File metadata

  • Download URL: pyright_cov-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 3.5 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.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9b4bb107f111e67a7edc28bb153425fe76aa93e10e9abfacf72a03f73f7e56c5
MD5 43304fb837be998fbd6789d6c35bb882
BLAKE2b-256 31e7e854b50710a9f6233a6f0099e3ba23a7a54bd4f898f9edf88e29a3974969

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyright_cov-0.1.3-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