Skip to main content

Custom Python lint rules — AST-based, pre-commit-friendly, hypermodern defaults

Project description

sarj-python-lint

Custom Python lint rules via stdlib ast. Designed for pre-commit. For SQL rules see sarj-sql-lint.

uv tool install sarj-python-lint

Pre-commit

- repo: https://github.com/sarj-ai/linting
  rev: python-v0.2.0
  hooks:
    - id: sarj-no-sequential-await
    - id: sarj-inefficient-string-concat-in-loop
    - id: sarj-prefer-discriminated-union
    - id: sarj-prefer-str-enum

CLI

sarj-python-lint check --rule no-sequential-await path/to/file.py
sarj-python-lint list-rules

Diagnostic format is path:line:col: CODE message — Ruff-compatible.

Suppression

Inline # sarj-noqa: SARJ00X — <reason> on the offending line.

Each rule's source under src/sarj_python_lint/rules/ carries its own description and diagnostic message.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sarj_python_lint-0.2.0.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

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

sarj_python_lint-0.2.0-py3-none-any.whl (11.6 kB view details)

Uploaded Python 3

File details

Details for the file sarj_python_lint-0.2.0.tar.gz.

File metadata

  • Download URL: sarj_python_lint-0.2.0.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for sarj_python_lint-0.2.0.tar.gz
Algorithm Hash digest
SHA256 af001906c0b9edb196c1d06d4a54cf62772e20729361a248ce95fb51323f1700
MD5 808b705db62502d8cdc959c673548bcb
BLAKE2b-256 38f193c437fdd424a5da76adb24b0305160720be83723c49965ca130cfa22128

See more details on using hashes here.

Provenance

The following attestation bundles were made for sarj_python_lint-0.2.0.tar.gz:

Publisher: release.yml on sarj-ai/linting

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

File details

Details for the file sarj_python_lint-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for sarj_python_lint-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8cf440565ad2a35323803fdf031a30886459e040cdc3f4fa8ee921e8a32d6495
MD5 ce1a11280a48a8be574375b6d1884419
BLAKE2b-256 320ddb1d11a7439b5e7215f6672c2b485cd69b3e75ac8bfc9b4c11b576a90997

See more details on using hashes here.

Provenance

The following attestation bundles were made for sarj_python_lint-0.2.0-py3-none-any.whl:

Publisher: release.yml on sarj-ai/linting

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

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page