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 and dependencies that do not resolve from a registry: 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 a location without a URL scheme (which uv reads as a path, so vendor/pkg as well as ./vendor/pkg) in project.dependencies, project.optional-dependencies, dependency-groups, tool.uv.dev-dependencies, tool.uv.override-dependencies, tool.uv.constraint-dependencies, tool.uv.build-constraint-dependencies and build-system.requires (${PROJECT_ROOT} expands to the manifest's directory), PEP 508 direct references to any other URL in those lists (https:, http:, git+https:, git+ssh: and other VCS schemes), path specs (file:, link:, specs starting with ., / or ~/, and, as npm reads them, other specs containing / or ending in .tgz, .tar.gz or .tar) in package.json dependency fields, and pnpm-workspace.yaml packages, catalogs and overrides, and in those package.json fields, catalogs and overrides any spec with a protocol other than npm:, jsr:, workspace: and catalog: (git, github: and other hosted git, http: and https: tarballs), an scp-style git location (git@host:path) or a GitHub shorthand (owner/repository). It treats the working directory as the repository root, which is where pre-commit runs hooks:

- repo: local
  hooks:
    - id: check-sources
      name: Reject non-registry dependency sources
      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.11.1

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.11.1
File Size Uploaded Provenance Actions
pragmatiks_lint-0.11.1.tar.gz 20.7 kB With provenance Details for pragmatiks_lint-0.11.1.tar.gz

Built distribution (wheel)

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

Total release size: 48.6 kB

Release files / pragmatiks_lint-0.11.1.tar.gz

Download URL pragmatiks_lint-0.11.1.tar.gz
Size 20.7 kB
Tags Source
SHA-256 checksum
How to use checksums
97b94d6c36dd554a7f2be89b1f768f66b62bf16bc1904e0ff4ffbc298275b61d
BLAKE2b-256 checksum
How to use checksums
af15e3461b41c8373c555ad80e5aa0b452b416e3d1d15d00a3ad08ff2b0eeac1
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 8, 2026.

Transparency log

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

Download URL pragmatiks_lint-0.11.1-py3-none-any.whl
Size 28.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
805d4acf4dbe296f6158a0d9fbe5ee022d6b1329be921fe7c80fa22185ed3f86
BLAKE2b-256 checksum
How to use checksums
7d8d40837a36a211ae12d7788b81142fb1068b863480dfdcbf1c4e4e7268a6f1
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 8, 2026.

Transparency log

Security for pragmatiks-lint 0.11.1

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.11.1.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 8, 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