pre-commit: Recognise piskel files via exclude_types #1289
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
My upstream pull request was merged:
The maintainer chose to edit my contribution to not add the
imagetagto piskel files:
Of course that's their prerogative as maintainer!
Unfortunately this means that my plan from commit
e92fd6d, to exclude all image files
with
exclude_types: [image], is not going to work. Instead we have toadd the
piskeltype explicitly to the list, and also any furthertext-based image file formats that we find in future.
Add
piskelto the exclude list. Replace theimagetype withsvg:svgis the only format with that type, and since that tag will not beapplied to any new formats, it's clearer to be explicit.
Remove the regex branches that match piskel files by name.
If you have
pre-commitset up locally, this change will cause the hookto fail:
If you installed
pre-commitwithuv tool installyou can run: