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.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.

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: quality_graph_python-0.1.9.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.9.tar.gz
Algorithm Hash digest
SHA256 0e3c07c33026da3d932ac6aa11ceb0b59342941d24e41ac7293ff716987617f3
MD5 81218d561724bb00cfcdf7ae560b99c4
BLAKE2b-256 6a0e27431bc09e553887716993f6a208130c558090000b976bfb2bb21dc04a6d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for quality_graph_python-0.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 b6e4ef3f70390aa148f49d0158b7e50d762b7d28450499cebc42afd60c9ffca2
MD5 42ce7bb5f6b222159931222a379c33f1
BLAKE2b-256 2bce665830061e480a5e77d075c714cfc4592de15202849c37cc72c75a5f1e40

See more details on using hashes here.

Provenance

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

This release

0.1.9 This release

2 files

0.1.8

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