Skip to main content

pragmatiks-lint

Python library for running Pragmatiks semgrep rules, and pre-commit checks for Pragmatiks repositories.

The base install carries PyYAML alone, which is all the pre-commit checks below need. Running the semgrep rules through run_check or the pragma lint command needs the check extra, which adds semgrep, typer and rich: install pragmatiks-lint[check]. Without it, run_check raises a RuntimeError naming the extra, and pragma lint check prints that message and exits 1. The pragma.commands entry point ships in the base install, since entry points cannot be gated on an extra, but pragmatiks_lint.cli imports typer and rich: a package that mounts pragma lint must depend on pragmatiks-lint[check], or pragma-cli skips the plugin with a warning.

from pathlib import Path

from pragmatiks_lint import run_check

findings = run_check([Path("src")], language="python")

The package also ships a strict no-comments check for Python files, run as a module by a local pre-commit hook:

- repo: local
  hooks:
    - id: check-comments
      name: Enforce NO COMMENTS policy
      entry: python -m pragmatiks_lint.comments
      language: python
      language_version: python3.13
      additional_dependencies: ["pragmatiks-lint==0.7.0"]
      types: [python]
      pass_filenames: true
      stages: [pre-commit]

It also ships a dependency source check that rejects committed paths leaving the repository: tool.uv.sources entries other than workspace members and in-repository paths, tool.uv.workspace members and excludes, tool.ty.environment.extra-paths entries, PEP 508 direct references to a file: URL or bare path in project.dependencies, project.optional-dependencies and dependency-groups (${PROJECT_ROOT} expands to the manifest's directory), path specs (file:, link:, bare paths including ~/) in package.json dependency fields, and pnpm-workspace.yaml packages, catalogs and overrides. It treats the working directory as the repository root, which is where pre-commit runs hooks:

- repo: local
  hooks:
    - id: check-sources
      name: Reject sibling path overrides
      entry: python -m pragmatiks_lint.sources
      language: python
      language_version: python3.13
      additional_dependencies: ["pragmatiks-lint==0.7.0"]
      files: (^|/)(pyproject\.toml|package\.json|pnpm-workspace\.yaml)$
      pass_filenames: true
      stages: [pre-commit]

It also ships a check that rejects uv pip in files that run commands: mise configuration, container builds, shell scripts, and non-prose files under .mise/tasks, mise-tasks, tasks, scripts and .github/workflows. The module chooses those files itself, so the hook takes every staged file and documentation passes:

- repo: local
  hooks:
    - id: check-uv-pip
      name: Reject uv pip in tracked files
      entry: python -m pragmatiks_lint.uv_pip
      language: python
      language_version: python3.13
      additional_dependencies: ["pragmatiks-lint==0.7.0"]
      pass_filenames: true
      stages: [pre-commit]

Pin every hook to the same version, the first release that ships pragmatiks_lint.uv_pip or later: pre-commit shares one environment between hooks only when their additional_dependencies match exactly.

It has no [project.scripts] entry. Command-line integration belongs in pragma-cli.

Metadata

Release files for pragmatiks-lint 0.9.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pragmatiks-lint 0.9.0
File Size Uploaded Provenance Actions
pragmatiks_lint-0.9.0.tar.gz 17.5 kB With provenance Details for pragmatiks_lint-0.9.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pragmatiks-lint 0.9.0
File Interpreter ABI Platform Actions
pragmatiks_lint-0.9.0-py3-none-any.whl Python 3 none any Details for pragmatiks_lint-0.9.0-py3-none-any.whl

Total release size: 40.9 kB

Release files / pragmatiks_lint-0.9.0.tar.gz

Download URL pragmatiks_lint-0.9.0.tar.gz
Size 17.5 kB
Tags Source
SHA-256 checksum
How to use checksums
b1fe1ad65639220fff9a48e1e2cf38b928d2eb76af4049b15bb7ce60ee5180d6
BLAKE2b-256 checksum
How to use checksums
bd72c521a91f83247424ae56580a4903191f3c90fd2c5f71e6bb337ef3dcc0a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 7, 2026.

Transparency log

Release files / pragmatiks_lint-0.9.0-py3-none-any.whl

Download URL pragmatiks_lint-0.9.0-py3-none-any.whl
Size 23.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8d781996b93127ef552901dc98bf6b19ce7f8d65743e0aa3ef13c3375c41e933
BLAKE2b-256 checksum
How to use checksums
be5a047231bef4841e6f62b585aa16ac7ad82ad0b9d5a194f3b7fc644a4b60eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 7, 2026.

Transparency log

Security for pragmatiks-lint 0.9.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pragmatiks_lint-0.9.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 7, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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