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.7.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.7-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

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

Hashes for quality_graph_python-0.1.7.tar.gz
Algorithm Hash digest
SHA256 9b4aaad2153f7bfcaba6f558d05a9d66715265039cd23480e0deb9f7959b2fac
MD5 d9074341eca4f56c4d32b9fbe274b634
BLAKE2b-256 616a16a61ded4d071c2faf43b4f89b5c9b2e3f21d76eb72b0df2039db86c4dab

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for quality_graph_python-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 69b618d91a0b56c6c3a247a4b3f0ed09ed8a437fbaeac8e02b3f4e81abc2becb
MD5 9663c13dee9b86c1715a62a6bd124331
BLAKE2b-256 737171802178ac0b2c737cca3c26a636548121230edfca1ac8b2a02de5a08f95

See more details on using hashes here.

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

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

0.1.8

2 files

This release

0.1.7 This release

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