Skip to main content

Pre-Commit-Excludes

PyPI PyPI - Python Version PyPI - License

Remove Unnecessary Excludes

remove-unnecessary-excludes finds lines in your exclude list that are no longer required and removes them from the supplied .pre-commit-config.yaml. The tool checks each exclude by running the affected hook without excludes and restores changes made by a failing hook when the exclude is still required.

# Cleanup the entire config for all hooks
uvx --from pre-commit-excludes remove-unnecessary-excludes .pre-commit-config.yaml --pre-commit-binary prek --git-binary git --all

# Cleanup only specific hooks such as typos and ruff-check
uvx --from pre-commit-excludes remove-unnecessary-excludes .pre-commit-config.yaml --pre-commit-binary prek --git-binary git --hook typos --hook ruff-check

# Skip excludes that you want to keep
uvx --from pre-commit-excludes remove-unnecessary-excludes .pre-commit-config.yaml --pre-commit-binary prek --git-binary git --all --skip-exclude "check-json:tests/invalid.json"

Restrict Folder Excludes

restrict-folder-excludes restricts excluded folders in the .pre-commit-config.yaml exclude list from a very broad folder exclude to more fine granular excludes.

# Restrict all excluded folders for all hooks
uvx --from pre-commit-excludes restrict-folder-excludes .pre-commit-config.yaml --all

# Restrict all excluded folders for specific hooks such as typos and ruff-check and skip the tests folder for check-json
uvx --from pre-commit-excludes restrict-folder-excludes .pre-commit-config.yaml --hook typos --hook ruff-check --skip-exclude "check-json:tests"

Example for the command above

# Before
exclude: |
  (?x)^(
    foo|
    bar
  )

# After
exclude: |
  (?x)^(
    foo/a|
    foo/b|
    foo/c|
    foo/foo.txt|
    foo/README.md|
    bar/a|
    bar/bar.txt
  )

Metadata

Release files for pre-commit-excludes 0.6.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 pre-commit-excludes 0.6.1
File Size Uploaded Provenance Actions
pre_commit_excludes-0.6.1.tar.gz 7.9 kB With provenance Details for pre_commit_excludes-0.6.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pre-commit-excludes 0.6.1
File Interpreter ABI Platform Actions
pre_commit_excludes-0.6.1-py3-none-any.whl Python 3 none any Details for pre_commit_excludes-0.6.1-py3-none-any.whl

Total release size: 18.3 kB

Release files / pre_commit_excludes-0.6.1.tar.gz

Download URL pre_commit_excludes-0.6.1.tar.gz
Size 7.9 kB
Tags Source
SHA-256 checksum
How to use checksums
af4e7b66ee49cedaaeca657d388708e8860eb2be749b7013b15aa6593632b405
BLAKE2b-256 checksum
How to use checksums
ae6adcfe96e2ac40c4201b153c4d767d7b92811d2f19d8443cb5442b2d72f642
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 12, 2026.

Transparency log

Release files / pre_commit_excludes-0.6.1-py3-none-any.whl

Download URL pre_commit_excludes-0.6.1-py3-none-any.whl
Size 10.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fb7019b169911172756674a67ddbc04bb6e0b18c25b882d9018a0d2f860387d3
BLAKE2b-256 checksum
How to use checksums
180526a87d6ac63766a089402ba5fbdfbc2e3235e2f5e85ffd8ef4153fd09555
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 12, 2026.

Transparency log

Security for pre-commit-excludes 0.6.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 pre_commit_excludes-0.6.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 Oct 12, 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