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 repo missing the .pre-commit-hooks.yaml file #692

Closed
keriksson-rosenqvist opened this issue Aug 3, 2023 · 2 comments
Closed

Comments

@keriksson-rosenqvist
Copy link
Contributor

I am trying to get autopep8 to run as part of my pre-commit suit but when I try to add it to the project I get an error that the .pre-commit-hooks.yaml file does not exist in the pulled repository. I can see the file in the github repo when viewing it in the browser but it is not included in the local repo directory. All other pre-commit repos/hooks are working as expected.


Command Line and Configuration

pyproject.toml

[tool.autopep8]
max_line_length = 92
exclude = ".venv,logs"

.pre-commit-config.yaml

repos:
  - repo: https://github.com/hhatto/autopep8
    rev: v2.0.2
    hooks:
      - id: autopep8

Command Line

$ git add pyproject.toml poetry.lock .pre-commit-config.yaml 
$ git commit -m "Autopep8"
An error has occurred: InvalidManifestError: 
=====> /home/kajsa/.cache/pre-commit/repon8wn9lpf/.pre-commit-hooks.yaml is not a file
Check the log at /home/kajsa/.cache/pre-commit/pre-commit.log
$ la ~/.cache/pre-commit/repon8wn9lpf/
AUTHORS.rst       coveralls.bash  .gitignore          LICENSE      README.rst  test
autopep8.py       .git            hooks               Makefile     setup.cfg   tox.ini
CONTRIBUTING.rst  .github         install_hooks.bash  MANIFEST.in  setup.py    update_readme.py

Your Environment

  • Python version: 3.9
  • autopep8 version: 2.0.2
  • Platform: linux
@keriksson-rosenqvist
Copy link
Contributor Author

Made a PR that fixes the issue here.

@asottile
Copy link
Contributor

asottile commented Oct 8, 2023

that PR does not fix things -- the pre-commit configuration is only present in v2.0.3 onwards -- you have selected v2.0.2

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

3 participants