Skip to main content

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

quality_graph_python-0.1.8.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

quality_graph_python-0.1.8-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

Details for the file quality_graph_python-0.1.8.tar.gz.

File metadata

  • Download URL: quality_graph_python-0.1.8.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

Hashes for quality_graph_python-0.1.8.tar.gz
Algorithm Hash digest
SHA256 e206de97232dc2553dd82c6fce278f40b71eb5c5d1609f5a2ff797cccc0be374
MD5 c9bda3f4f672b8a36dcbac67c1a10caa
BLAKE2b-256 851c379e62e5c61f6dc30aaf8103f99fe377e6681abeb6504b820d695ccb3156

See more details on using hashes here.

Provenance

The following attestation bundles were made for quality_graph_python-0.1.8.tar.gz:

Publisher: release.yml on alchemmist/quality-graph

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file quality_graph_python-0.1.8-py3-none-any.whl.

File metadata

File hashes

Hashes for quality_graph_python-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 8610cb232472be4779414fc49f96a4d4ad11ef24f374e7b27fd6cfe0441a6f25
MD5 d9858691362ffbe1c1e97d6a43c408d9
BLAKE2b-256 2c44b5b8b7c942b327c1b92fda41c01f66b4afec48f22711c4b97a82c9e8daa6

See more details on using hashes here.

Provenance

The following attestation bundles were made for quality_graph_python-0.1.8-py3-none-any.whl:

Publisher: release.yml on alchemmist/quality-graph

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.1.10

2 files

0.1.9

2 files

This release

0.1.8 This release

2 files

0.1.7

2 files

0.1.6

2 files

0.1.4

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page