Skip to content

Commit bcddd8d

Browse files
authored
Merge pull request #697 from 12rambau/pre-commit
refactor: set default_install_hook_types
2 parents d07c029 + 1153908 commit bcddd8d

6 files changed

+13
-7
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,4 +112,4 @@ venv.bak/
112112
.DS_Store
113113

114114
# ruff
115-
.ruff_cache
115+
.ruff_cache

.pre-commit-config.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
1+
default_install_hook_types:
2+
- pre-commit
3+
- commit-msg
4+
- pre-push
5+
16
default_stages:
27
- commit
38
- push
9+
410
repos:
511
- repo: https://github.com/pre-commit/pre-commit-hooks
612
rev: v4.1.0
@@ -35,6 +41,6 @@ repos:
3541
name: linter and test
3642
language: system
3743
pass_filenames: false
38-
stage: push
44+
stages: [push]
3945
entry: ./scripts/test
4046
types: [python]

docs/contributing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ If you're a first-time contributor, you can check the issues with [good first is
1616
1. Fork [the repository](https://github.com/commitizen-tools/commitizen).
1717
2. Clone the repository from your GitHub.
1818
3. Setup development environment through [poetry](https://python-poetry.org/) (`poetry install`).
19-
4. Setup [pre-commit](https://pre-commit.com/) hook (`poetry run pre-commit install -t pre-commit -t pre-push -t commit-msg`)
19+
4. Setup [pre-commit](https://pre-commit.com/) hook (`poetry run pre-commit install`)
2020
5. Check out a new branch and add your modification.
2121
6. Add test cases for all your changes.
2222
(We use [CodeCov](https://codecov.io/) to ensure our test coverage does not drop.)

docs/getting_started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,4 +116,4 @@ Note that pre-commit discourages using `master` as a revision, and the above com
116116
pre-commit autoupdate
117117
```
118118

119-
Read more about the `check` command [here](check.md).
119+
Read more about the `check` command [here](check.md).

poetry.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ pytest-xdist = "^3.1.0"
6262
black = "^22.10"
6363
# linter
6464
ruff = "^0.0.262"
65-
pre-commit = "^2.6.0"
65+
pre-commit = "^2.18.0"
6666
mypy = "^0.931"
6767
types-PyYAML = "^5.4.3"
6868
types-termcolor = "^0.1.1"

0 commit comments

Comments
 (0)