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.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6489ac0f99ee575ac83c6664317ad6da20fb6326230130695311bd9d260dc590
|
|
| MD5 |
4d93ac3dbe5da1704625cd8a9f2ab9cf
|
|
| BLAKE2b-256 |
e1232897743e26f9539a1f9faa6a351c479ae57fca72fcc537fd1c02e0b93086
|
Provenance
The following attestation bundles were made for pyright_cov-0.2.1.tar.gz:
Publisher:
publish_to_pypi.yml on MarcoGorelli/pyright-cov
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyright_cov-0.2.1.tar.gz -
Subject digest:
6489ac0f99ee575ac83c6664317ad6da20fb6326230130695311bd9d260dc590 - Sigstore transparency entry: 245950578
- Sigstore integration time:
-
Permalink:
MarcoGorelli/pyright-cov@fd523a14a85c3e560a0a69da649e01a9bf251239 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/MarcoGorelli
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish_to_pypi.yml@fd523a14a85c3e560a0a69da649e01a9bf251239 -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d9a3d1075918dbfa5d1a581aa7b4722d3c6b8277553c56e5befd4e12c8745ff9
|
|
| MD5 |
04d84bf2f8a406e89d70b240e7e18da8
|
|
| BLAKE2b-256 |
5bce42cceb91da1b765cb960c3ea0689fafe8ae9a4fce0006ac9f95da3a73390
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyright_cov-0.2.1-py3-none-any.whl -
Subject digest:
d9a3d1075918dbfa5d1a581aa7b4722d3c6b8277553c56e5befd4e12c8745ff9 - Sigstore transparency entry: 245950580
- Sigstore integration time:
-
Permalink:
MarcoGorelli/pyright-cov@fd523a14a85c3e560a0a69da649e01a9bf251239 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/MarcoGorelli
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish_to_pypi.yml@fd523a14a85c3e560a0a69da649e01a9bf251239 -
Trigger Event:
push
-
Statement type: