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 --exclude-like, for example:

pyright-cov --verifytypes foo --ignoreexternal --exclude-like "*.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.2.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.2-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyright_cov-0.2.2.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.2.tar.gz
Algorithm Hash digest
SHA256 705790d5858bd5bd8c233dd85a7d5e7a7c73a64c86bfd4885c9e33e3e557a867
MD5 8221f0efb1e1eef63b8303c1de3aab27
BLAKE2b-256 b51a5a3229af608bb185c6f6611a23593ae4101a5b89b674860b7ee0f4a8adc1

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: pyright_cov-0.2.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1a6f14ea28fcd0585325400733fe66d417a78c527da7676aeb8549a008d276a9
MD5 e810e6525449f8b2610b4c6c611ffb88
BLAKE2b-256 d6214ecb58883d7a1802c9f780e5650dfd10492be457d120a8abf0b7753e15e9

See more details on using hashes here.

Provenance

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