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

pre-commit python version mismatch and outdated black hooks repository #1746

Open
bliepp opened this issue Apr 11, 2024 · 0 comments
Open

pre-commit python version mismatch and outdated black hooks repository #1746

bliepp opened this issue Apr 11, 2024 · 0 comments

Comments

@bliepp
Copy link
Contributor

bliepp commented Apr 11, 2024

Hello there,

on my machine I get an error when running make setup. Some investigation showed that setup-venv finished successfully while setup-pre-commit fails with an InvalidManifestError. Also, it prevents from commits being made to this repo / or a fork of it). Full error message:

[... venv setup and package inatallation ...]
Successfully installed [... alll the packages ...]
.venv/bin/pre-commit install --overwrite --install-hooks
pre-commit installed at .git/hooks/pre-commit
An error has occurred: InvalidManifestError: 
==> File /home/bliepp/.cache/pre-commit/repo9cqtpufl/.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, prepare-commit-msg, push but got: 'pre-commit'
Check the log at /home/bliepp/.cache/pre-commit/pre-commit.log
make: *** [Makefile:28: setup-pre-commit] Fehler 1

I'm using Manjaro Linux and tried with Python3.8 and 3.11.

When replacing https://github.com/psf/black with https://github.com/psf/black-pre-commit-mirror in .pre-commit-config.yaml this error went away, but it then complained about not finding the interpreter of python3.10 (I haven't installed it, so duh). Changing the python version in .pre-commit-config.yaml back to python3.8 (the same this repo uses according to runtime.txt) fixed it.

(I just realized the first part about "black" hook repo being outdated seems like it's related to #1733 and #1737.)

@bliepp bliepp changed the title make setup fails due to error in pre-commit setup (InvalidManifestError) pre-commit python version mismatch and outdated black hooks repository Apr 11, 2024
bliepp added a commit to bliepp/uberlab that referenced this issue Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant