diff --git a/.gitignore b/.gitignore index 7eede0c966..be07cf2d93 100644 --- a/.gitignore +++ b/.gitignore @@ -112,4 +112,4 @@ venv.bak/ .DS_Store # ruff -.ruff_cache \ No newline at end of file +.ruff_cache diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5d99c21eac..5fa5e26c99 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,12 @@ +default_install_hook_types: + - pre-commit + - commit-msg + - pre-push + default_stages: - commit - push + repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.1.0 @@ -35,6 +41,6 @@ repos: name: linter and test language: system pass_filenames: false - stage: push + stages: [push] entry: ./scripts/test types: [python] diff --git a/docs/contributing.md b/docs/contributing.md index 6cf5877c48..c21c7b5e49 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -16,7 +16,7 @@ If you're a first-time contributor, you can check the issues with [good first is 1. Fork [the repository](https://github.com/commitizen-tools/commitizen). 2. Clone the repository from your GitHub. 3. Setup development environment through [poetry](https://python-poetry.org/) (`poetry install`). -4. Setup [pre-commit](https://pre-commit.com/) hook (`poetry run pre-commit install -t pre-commit -t pre-push -t commit-msg`) +4. Setup [pre-commit](https://pre-commit.com/) hook (`poetry run pre-commit install`) 5. Check out a new branch and add your modification. 6. Add test cases for all your changes. (We use [CodeCov](https://codecov.io/) to ensure our test coverage does not drop.) diff --git a/docs/getting_started.md b/docs/getting_started.md index 7fef3a9126..afc2586412 100644 --- a/docs/getting_started.md +++ b/docs/getting_started.md @@ -116,4 +116,4 @@ Note that pre-commit discourages using `master` as a revision, and the above com pre-commit autoupdate ``` -Read more about the `check` command [here](check.md). \ No newline at end of file +Read more about the `check` command [here](check.md). diff --git a/poetry.lock b/poetry.lock index 32a67a148f..c8f8503177 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.4.0 and should not be changed by hand. +# This file is automatically @generated by Poetry and should not be changed by hand. [[package]] name = "appnope" @@ -1599,4 +1599,4 @@ testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more [metadata] lock-version = "2.0" python-versions = "^3.7" -content-hash = "1c2ebb7edcfa73e87d806c2e821933ff58a81a3cb07f708d5eb257ab131710a9" +content-hash = "ee6d7cb4d36c4f9312dcba8818bbdd1426f5c2b04ddf92687835fa99fd3f3a4e" diff --git a/pyproject.toml b/pyproject.toml index d547ceb2a7..420a5e13cc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -62,7 +62,7 @@ pytest-xdist = "^3.1.0" black = "^22.10" # linter ruff = "^0.0.262" -pre-commit = "^2.6.0" +pre-commit = "^2.18.0" mypy = "^0.931" types-PyYAML = "^5.4.3" types-termcolor = "^0.1.1"