Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Fixes file `types` from .pre-commit-config.yaml issue #744
This PR fixes a bug where files are not being recognized based on their
Technical writeup of findings: Commit message for 29d66f4
Issue / Reproduction case
When using a pre-commit-config.yaml in a repository with many bash scripts (that lack a
That pre-commit finds the files with a shebang of
I added two test cases, one for Python (which did behave properly) and one for a bash script like:
Then I tracked down the issue to the comparison between a List and a FrozenSet here:
I rewrote that comparison to compare two FrozenSets using the
Once this is approved, I'll happily squash it down to a single commit. Right now it's 2 commits to show the spec failing before the patch.
First off, thanks for the issue and PR!
Turns out the current behaviour is intentional (
At least for your case,