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

Unexpected key(s) present on https://github.com/myint/docformatter: language #297

Closed
hughplay opened this issue Nov 5, 2024 · 2 comments
Labels
fresh This is a new issue

Comments

@hughplay
Copy link

hughplay commented Nov 5, 2024

Running pre-commit -a failed:

[WARNING] Unexpected key(s) present on https://github.com/myint/docformatter: language
An error has occurred: InvalidManifestError: 
==> File /home/xxx/.cache/pre-commit/repoy0mt_548/.pre-commit-hooks.yaml
==> At Hook(id='docformatter-venv')
==> At key: language
=====> Expected one of conda, coursier, dart, docker, docker_image, dotnet, fail, golang, haskell, lua, node, perl, pygrep, python, r, ruby, rust, script, swift, system but got: 'python_venv'
Check the log at /home/xxx/.cache/pre-commit/pre-commit.log

After searching, I found:

it looks like you've recently updated to pre-commit 4.0.0 which removes support for language: python_venv. this has been warning for quite a while now but fortunately language: python_venv is just an alias to language: python

if you've set language: python_venv in your configuration (.pre-commit-config.yaml) directly, you can run pre-commit migrate-config to automatically update that to language: python

if it's in an external repository (which is what it looks like given your error message above) you'll want to run pre-commit autoupdate which ~usually will bump you to a version that is fixed -- however if that does not fix your problem you'll need to report the issue to whatever repo is setting language: python_venv in their .pre-commit-hooks.yaml (in this example here it looks like the repository is https://example.com/some/repo and the hook id is some-hook-id)

@github-actions github-actions bot added the fresh This is a new issue label Nov 5, 2024
@finswimmer
Copy link

finswimmer commented Nov 6, 2024

Duplicate of #289

Also see #293

@hughplay
Copy link
Author

hughplay commented Nov 6, 2024

Got it. Thank you.

@hughplay hughplay closed this as completed Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fresh This is a new issue
Projects
None yet
Development

No branches or pull requests

2 participants