-
-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Severity
Breaking Bug (functionality doesn't work at all)
Priority
High (significantly impacts usability)
Steps to Reproduce
- Clone the repository and checkout the
fix/update-contributors-pushbranch. - Ensure
pre-commitis installed. - Run
git commit -m "Updating comments". - Observe the error from
pre-commit.
Expected Behavior
The pre-commit hooks should execute successfully during the commit, without any configuration error.
Actual Behavior
An error is thrown:
InvalidConfigError:
==> File .pre-commit-config.yaml
==> At Config()
==> At key: repos
==> At Repository(repo='local')
==> At key: hooks
==> At Hook(id='pytest')
==> At key: stages
==> At index 0
=====> Expected one of commit, commit-msg, manual, merge-commit, post-checkout, post-commit, post-merge, post-rewrite, prepare-commit-msg, push but got: 'pre-commit'
System Information
Debug Information
System Information
- Date: Wed May 8 2025
- OS: Windows (MINGW64 on Git Bash)
- Architecture: x86_64
Development Tools
- Python: Python 3.11.7
- uv: uv 0.1.24
- ruff: ruff 0.1.9
- git: git version 2.43.0.windows.1
- just: just 1.21.0
Screenshots
N/A
Logs
InvalidConfigError:
==> File .pre-commit-config.yaml
==> At Config()
==> At key: repos
==> At Repository(repo='local')
==> At key: hooks
==> At Hook(id='pytest')
==> At key: stages
==> At index 0
=====> Expected one of commit, commit-msg, manual, merge-commit, post-checkout, post-commit, post-merge, post-rewrite, prepare-commit-msg, push but got: 'pre-commit'Possible Solution
In .pre-commit-config.yaml, replace:
```yaml
stages: [pre-commit]
with:
yaml
stages: [commit]
This change aligns with the supported values listed in the pre-commit documentation.
Contribution
Yes, I'd be willing to work on a fix
Pre-submission Confirmation
Yes
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working