Open
Description
I noticed an odd failure which might be related to #36. I was adding this to an existing project and added the following to my .pre-commit-config.yaml
file:
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.12.2
hooks:
- id: validate-pyproject
I updated pyproject.toml
to test it and ran git commit -a
, waited for it to install the hook, and got this crash:
[ERROR] FileNotFoundError: [Errno 2] No such file or directory: '/Users/cadams/.cache/pre-commit/repobqc66rm2/py_env-python3/lib/python3.11/site-packages/validate_pyproject/pyproject_toml.schema.json'
What's interesting is that pre-commit run --all-files
did not fail on the same repository. If I run it with -v
, I see output like this indicating that it successfully validated the file:
Validate pyproject.toml..................................................Passed
- hook id: validate-pyproject
- duration: 0.09s
Valid file: pyproject.toml
If I change the pre-commit hook like this, it starts working, suggesting this is related to packaging:
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.12.2
hooks:
- id: validate-pyproject
additional_dependencies:
- validate-pyproject