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

Uploaded Python 3

File details

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

File metadata

  • Download URL: quality_graph_python-0.1.4.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.4.tar.gz
Algorithm Hash digest
SHA256 85df33abb5aac2f54080004e632cf0f8535ec4e3892a6c0aba8c533b2b092b6b
MD5 05199d7bfbf97a34b52e872b3e6e0e6c
BLAKE2b-256 907ada770222e65530b2d24aa6aa4a90ef41bb5f419994c3be3aa353eb39a2d9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for quality_graph_python-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 ee5387f91bf6aa51c9af0ed4c847b080810683a33ada335639d78b2723789682
MD5 40497dd60a472fbcebfbbfc14095bcef
BLAKE2b-256 cd94874df58b200a6c7ea367cfc9dfaec08d6da3982312978161d053fba463ff

See more details on using hashes here.

Provenance

The following attestation bundles were made for quality_graph_python-0.1.4-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

0.1.7

2 files

0.1.6

2 files

This release

0.1.4 This release

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