Quality Graph Python Gates
Provider-independent source and diff quality gates for Python repositories. The package does not depend on the GitHub provider and every command can run locally, in Quality Graph, or in another CI system.
Installation
uv add --dev quality-graph-python==0.1.8
Diff-based commands compare committed repository content with origin/main by default. CI must
fetch the base history. Pass --base when the default branch or comparison point differs.
Commands
| Command | Scope | What fails |
|---|---|---|
qg-python-suppressions --base origin/main |
Added lines in Python and common config files | New noqa, nosec, type ignores, coverage pragmas, or ignore/exclude configuration |
qg-python-object-annotations --base origin/main |
Added Python annotation lines | Direct, qualified, or forward object annotations |
qg-python-triple-quotes --base origin/main |
Added Python string delimiters | One-line triple-quoted strings or multiline delimiters sharing a line with content; real docstrings are excluded |
qg-python-time-bombs --base origin/main |
Added Python and shell lines | Integer literals that plausibly encode Unix timestamps in seconds through nanoseconds |
qg-python-no-comments packages apps scripts |
Every Python file below the selected roots | Code comments other than shebangs and narrowly recognized tool directives |
qg-python-flaky --base origin/main --attempts 3 |
Changed Python test files | Consistent failures or mixed pass/fail outcomes across repeated pytest runs |
Diagnostics use path:line:column: message and commands return non-zero when findings exist.
Make integration
Keep graph nodes semantic by routing commands through repository Make targets:
BASE ?= origin/main
.PHONY: python-suppressions python-object-annotations python-triple-quotes \
python-time-bombs python-no-comments flaky-python
python-suppressions:
uv run qg-python-suppressions --base "$(BASE)"
python-object-annotations:
uv run qg-python-object-annotations --base "$(BASE)"
python-triple-quotes:
uv run qg-python-triple-quotes --base "$(BASE)"
python-time-bombs:
uv run qg-python-time-bombs --base "$(BASE)"
python-no-comments:
uv run qg-python-no-comments packages apps scripts
flaky-python:
uv run qg-python-flaky --base "$(BASE)" --attempts 3
The no-comments gate intentionally scans complete roots. The other source gates are incremental and reject newly introduced debt without forcing an immediate cleanup of unchanged legacy code.
Graph integration
profiles:
python:
extends: default
setup:
- uses: astral-sh/setup-uv@v7
- run: uv sync --locked
nodes:
suppressions:
profile: python
run: make python-suppressions
type:
profile: python
needs: [suppressions]
run: make type
flaky:
profile: python
needs: [type]
run: make flaky-python
Use fetch-depth: "0" on the checkout setup step when any node compares against a Git base.
Metadata
Release files for quality-graph-python 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| quality_graph_python-0.2.0.tar.gz | 7.4 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| quality_graph_python-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 19.5 kB
Release files / quality_graph_python-0.2.0.tar.gz
| Download URL | quality_graph_python-0.2.0.tar.gz |
|---|---|
| Size | 7.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
57976415d11c01fe0c12614f357ea91143a41e5bbdbda1a6e4816b21b932812c
|
|
BLAKE2b-256 checksum How to use checksums |
9b8d4fa1ef880bb09479d7eabb52be7da6fb5ca847e944ba5ddd8f16f64b158c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 21, 2026.
Transparency logRelease files / quality_graph_python-0.2.0-py3-none-any.whl
| Download URL | quality_graph_python-0.2.0-py3-none-any.whl |
|---|---|
| Size | 12.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3211da75cb23785135c03b1595fc1f883ba8ce28e79a779d3aa072a61edf3a36
|
|
BLAKE2b-256 checksum How to use checksums |
a32b1b8fe8dec77e17e9aff10871b7788c96e40294216e198b87d0c7aca74c50
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 21, 2026.
Transparency logSecurity for quality-graph-python 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for quality_graph_python-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 21, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.