Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Current pre-commit version no longer works with latest hooks #272

Closed
alyssadai opened this issue Jan 18, 2024 · 1 comment
Closed

Current pre-commit version no longer works with latest hooks #272

alyssadai opened this issue Jan 18, 2024 · 1 comment
Labels
maint:dependency Dependency updates and their version upgrades. type:maintenance Upkeeping efforts & catch-up corrective improvements that are not Features nor Bugs

Comments

@alyssadai
Copy link
Contributor

pre-commit run locally now gives the following error:

[INFO] Initializing environment for https://github.com/psf/black.
An error has occurred: InvalidManifestError: 
==> File C:\Users\adai\.cache\pre-commit\repol_is_t8k\.pre-commit-hooks.yaml
==> At Hook(id='black')
==> At key: stages
==> At index 0
=====> Expected one of commit, commit-msg, manual, merge-commit, post-checkout, post-commit, post-merge, post-rewrite, prepare-commit-msg

This is happening because there was a change pre-commit v3.2.0 that resulted in some repos changing their hook syntax, e.g. psf/black#3940. Now that we have pre-commit.ci auto-updating all hooks, our (older) pre-commit version has become incompatible with the latest hooks.

See also:

To fix

  • Easiest way would be to upgrade pre-commit to the latest version
@alyssadai alyssadai added type:maintenance Upkeeping efforts & catch-up corrective improvements that are not Features nor Bugs maint:dependency Dependency updates and their version upgrades. labels Jan 18, 2024
@alyssadai
Copy link
Contributor Author

Was too trigger-happy in opening this issue and didn't double check the pre-commit ver. in this this specific repo. The version here is >3.2.0 and thus shouldn't encounter any issues.

@alyssadai alyssadai closed this as not planned Won't fix, can't repro, duplicate, stale Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maint:dependency Dependency updates and their version upgrades. type:maintenance Upkeeping efforts & catch-up corrective improvements that are not Features nor Bugs
Projects
Archived in project
Development

No branches or pull requests

1 participant