Pre-Commit-Excludes
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 inexcludefields — 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af8e65918ff3dd9aaee79b0bbb03336d47955043bc303d286b54da5d1187761a
|
|
| MD5 |
a2fd3bb7f6aaafe7d48c084a7c525669
|
|
| BLAKE2b-256 |
189d319204188082aea3c4fda7b1a66d59eed38a6162ab9e9fe11fe70bf3bab9
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pre_commit_excludes-0.3.0.tar.gz -
Subject digest:
af8e65918ff3dd9aaee79b0bbb03336d47955043bc303d286b54da5d1187761a - Sigstore transparency entry: 2282473535
- Sigstore integration time:
-
Permalink:
hofbi/dev-tools@5b263ed94d845ca3592b82c23c24dd7d1313b7e6 -
Branch / Tag:
refs/tags/pre-commit-excludes-0.3.0 - Owner: https://github.com/hofbi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pre-commit-excludes.yml@5b263ed94d845ca3592b82c23c24dd7d1313b7e6 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pre_commit_excludes-0.3.0-py3-none-any.whl.
File metadata
- Download URL: pre_commit_excludes-0.3.0-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fb0c058942548931ecb4ab4f471c32ff6577df2d52d68b30efeaae41406d839f
|
|
| MD5 |
9c056b57796ff2a8798064a325f9f771
|
|
| BLAKE2b-256 |
78ea148a52811b31615946bd7bbad8e613992fdfcde1981f2c69c13520a7979c
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pre_commit_excludes-0.3.0-py3-none-any.whl -
Subject digest:
fb0c058942548931ecb4ab4f471c32ff6577df2d52d68b30efeaae41406d839f - Sigstore transparency entry: 2282473592
- Sigstore integration time:
-
Permalink:
hofbi/dev-tools@5b263ed94d845ca3592b82c23c24dd7d1313b7e6 -
Branch / Tag:
refs/tags/pre-commit-excludes-0.3.0 - Owner: https://github.com/hofbi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pre-commit-excludes.yml@5b263ed94d845ca3592b82c23c24dd7d1313b7e6 -
Trigger Event:
push
-
Statement type: