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

Warning deprecated stage with pre-commit v4 #2294

Open
Rotzbua opened this issue Oct 6, 2024 · 0 comments · May be fixed by #2296
Open

Warning deprecated stage with pre-commit v4 #2294

Rotzbua opened this issue Oct 6, 2024 · 0 comments · May be fixed by #2296

Comments

@Rotzbua
Copy link

Rotzbua commented Oct 6, 2024

Problem

V4 of pre-commit deprecated some stages.
https://github.com/pre-commit/pre-commit/releases/tag/v4.0.0

Warning output

[INFO] Initializing environment for https://github.com/pycqa/isort.
[WARNING] repo `[https://github.com/pycqa/isort`](https://github.com/pycqa/isort%60) uses deprecated stage names (commit, merge-commit, push) which will be removed in a future version.  Hint: often `pre-commit autoupdate --repo [https://github.com/pycqa/isort`](https://github.com/pycqa/isort%60) will fix this.  if it does not -- consider reporting an issue to that repo.

Reference

pre-commit/pre-commit#2732

matthewhughes934 added a commit to matthewhughes934/isort that referenced this issue Oct 10, 2024
`pre-commit` v4.0.0 added a warning to deprecated stage names[1] so
update these names to avoid the warning. This also required updating the
minimum `pre-commit` version to one that supports the new names

See also[2] for a similar change and the docs[3].

[1] https://github.com/pre-commit/pre-commit/blob/cc4a52241565440ce200666799eef70626457488/CHANGELOG.md#400---2024-10-05
[2] pre-commit/pre-commit-hooks@003dfa5
[3] https://pre-commit.com/#confining-hooks-to-run-at-certain-stages

Fixes: PyCQA#2294
@matthewhughes934 matthewhughes934 linked a pull request Oct 10, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant