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 #258

Closed
alyssadai opened this issue Jan 18, 2024 · 0 comments · Fixed by #259
Closed

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

alyssadai opened this issue Jan 18, 2024 · 0 comments · Fixed by #259
Assignees
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 alyssadai self-assigned this 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

Successfully merging a pull request may close this issue.

1 participant