ITADN

pre-commit-hooks>=5.0.0 does not work with pre-commit >4.5.0 (suppose with versions earlier as well)

#1237Openostegura 创建于 2026-01-16
O
osteguracommented
running into: `An error has occurred: InvalidManifestError: ==> File /../.cache/pre-commit/repoh3e9f0dq/.pre-commit-hooks.yaml ==> At Hook(id='check-added-large-files') ==> 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 /../.cache/pre-commit/pre-commit.log` setup I run into problem with: pre-commit-hooks>=5.0.0 + pre-commit>=4.5.0 Right now stable and working setup: pre-commit-hooks>=4.6.0 + pre-commit>=4.5.0 I suppose the problem is in current pre-commit-hooks package yaml config: ` - id: check-added-large-files \n name: check for added large files description: prevents giant files from being committed. entry: check-added-large-files language: python stages: [**pre-commit**, pre-push, manual] minimum_pre_commit_version: 3.2.0 ` Also, during investigating of an issue I've found: `> pre-commit validate-manifest .pre-commit-config.yaml ==> File .pre-commit-config.yaml =====> =====> pre-commit version 5 is required but version 4.5.1 is installed. Perhaps run pip install --upgrade pre-commit.` ^^ the problem is latest pre-commit version is 4.x.x
0 条评论