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
dependencies Dependency updates and their version upgrades.

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 dependencies Dependency updates and their version upgrades. labels Jan 18, 2024
@alyssadai alyssadai moved this to Implement - Done in Neurobagel Jan 18, 2024
@alyssadai alyssadai self-assigned this Jan 18, 2024
@surchs surchs moved this from Implement - Done to Review - Active in Neurobagel Jan 19, 2024
@github-project-automation github-project-automation bot moved this from Review - Active to Review - Done in Neurobagel Jan 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Dependency updates and their version upgrades.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant