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.2
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.
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 quality_graph_python-0.1.7.tar.gz.
File metadata
- Download URL: quality_graph_python-0.1.7.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9b4aaad2153f7bfcaba6f558d05a9d66715265039cd23480e0deb9f7959b2fac
|
|
| MD5 |
d9074341eca4f56c4d32b9fbe274b634
|
|
| BLAKE2b-256 |
616a16a61ded4d071c2faf43b4f89b5c9b2e3f21d76eb72b0df2039db86c4dab
|
Provenance
The following attestation bundles were made for quality_graph_python-0.1.7.tar.gz:
Publisher:
release.yml on alchemmist/quality-graph
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
quality_graph_python-0.1.7.tar.gz -
Subject digest:
9b4aaad2153f7bfcaba6f558d05a9d66715265039cd23480e0deb9f7959b2fac - Sigstore transparency entry: 2686398613
- Sigstore integration time:
-
Permalink:
alchemmist/quality-graph@caf5366a04ca01b230f1df5585d0fbd9693d7bef -
Branch / Tag:
refs/tags/v0.1.7 - Owner: https://github.com/alchemmist
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@caf5366a04ca01b230f1df5585d0fbd9693d7bef -
Trigger Event:
push
-
Statement type:
File details
Details for the file quality_graph_python-0.1.7-py3-none-any.whl.
File metadata
- Download URL: quality_graph_python-0.1.7-py3-none-any.whl
- Upload date:
- Size: 12.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
69b618d91a0b56c6c3a247a4b3f0ed09ed8a437fbaeac8e02b3f4e81abc2becb
|
|
| MD5 |
9663c13dee9b86c1715a62a6bd124331
|
|
| BLAKE2b-256 |
737171802178ac0b2c737cca3c26a636548121230edfca1ac8b2a02de5a08f95
|
Provenance
The following attestation bundles were made for quality_graph_python-0.1.7-py3-none-any.whl:
Publisher:
release.yml on alchemmist/quality-graph
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
quality_graph_python-0.1.7-py3-none-any.whl -
Subject digest:
69b618d91a0b56c6c3a247a4b3f0ed09ed8a437fbaeac8e02b3f4e81abc2becb - Sigstore transparency entry: 2686398651
- Sigstore integration time:
-
Permalink:
alchemmist/quality-graph@caf5366a04ca01b230f1df5585d0fbd9693d7bef -
Branch / Tag:
refs/tags/v0.1.7 - Owner: https://github.com/alchemmist
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@caf5366a04ca01b230f1df5585d0fbd9693d7bef -
Trigger Event:
push
-
Statement type: