Skip to main content

Pre-Commit-Excludes

PyPI PyPI - Python Version PyPI - License

remove-unnecessary-excludes should help you to find lines in your exclude list that are no longer required. Running this tool will try to remove excludes from your config by removing a line, running the hook, and restore the old config if it is still required.

Right now this is in early development, so we don't automatically update the .pre-commit-config.yaml with all unnecessary excludes removed. Instead, we only print which excludes can be removed for which hook. More automation will come in future releases.

[!NOTE] This hook deliberately only supports simple |-separated lists of file paths in exclude fields — complex regular expressions are not supported. Keeping exclusions as plain |-separated paths also makes it easier for humans to maintain an overview of what is excluded.

Usage

# Cleanup the entire config for all hooks
uvx 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 remove-unnecessary-excludes .pre-commit-config.yaml --pre-commit-binary prek --git-binary git --hook typos --hook ruff-check

Download files

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

Source Distribution

pre_commit_excludes-0.3.0.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

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

pre_commit_excludes-0.3.0-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file pre_commit_excludes-0.3.0.tar.gz.

File metadata

  • Download URL: pre_commit_excludes-0.3.0.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for pre_commit_excludes-0.3.0.tar.gz
Algorithm Hash digest
SHA256 af8e65918ff3dd9aaee79b0bbb03336d47955043bc303d286b54da5d1187761a
MD5 a2fd3bb7f6aaafe7d48c084a7c525669
BLAKE2b-256 189d319204188082aea3c4fda7b1a66d59eed38a6162ab9e9fe11fe70bf3bab9

See more details on using hashes here.

Provenance

The following attestation bundles were made for pre_commit_excludes-0.3.0.tar.gz:

Publisher: publish-pre-commit-excludes.yml on hofbi/dev-tools

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

File details

Details for the file pre_commit_excludes-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pre_commit_excludes-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fb0c058942548931ecb4ab4f471c32ff6577df2d52d68b30efeaae41406d839f
MD5 9c056b57796ff2a8798064a325f9f771
BLAKE2b-256 78ea148a52811b31615946bd7bbad8e613992fdfcde1981f2c69c13520a7979c

See more details on using hashes here.

Provenance

The following attestation bundles were made for pre_commit_excludes-0.3.0-py3-none-any.whl:

Publisher: publish-pre-commit-excludes.yml on hofbi/dev-tools

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

2 files

0.5.0

2 files

0.4.0

2 files

This release

0.3.0 This release

2 files

0.2.0

2 files

Supported by

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