diff --git a/.github/workflows/lint_and_docs.yml b/.github/workflows/lint_and_docs.yml index 483fc028..38cd5222 100644 --- a/.github/workflows/lint_and_docs.yml +++ b/.github/workflows/lint_and_docs.yml @@ -23,7 +23,7 @@ jobs: - name: Lint sources run: | make lint PYTHON=python3 - python3 -m pre_commit run --all-files --hook-stage pre-push + python3 -m prek run --all-files --hook-stage pre-push - name: Build docs run: | towncrier build --version 99.99 --name pystack --keep diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9216621b..dd666f51 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -61,11 +61,11 @@ easier to validate it. ### Linting your code -Before commiting anything, install the pre-commit hooks: +Before commiting anything, install the prek (pre-commit) hooks: ```shell python3 -m pip install -r requirements-extra.txt -pre-commit install +prek install ``` This will ensure that your contribution passes our linting checks. diff --git a/Makefile b/Makefile index f3e3b6a9..93116238 100644 --- a/Makefile +++ b/Makefile @@ -79,11 +79,11 @@ ccoverage: ## Run the test suite, with C++ code coverage .PHONY: format format: ## Autoformat all files - $(PYTHON) -m pre_commit run --all-files + $(PYTHON) -m prek run --all-files .PHONY: lint lint: ## Lint all files - $(PYTHON) -m pre_commit run --all-files + $(PYTHON) -m prek run --all-files $(PYTHON) -m mypy src/pystack --strict --ignore-missing-imports $(PYTHON) -m mypy tests --ignore-missing-imports diff --git a/README.md b/README.md index a6df6fe3..b8b91cba 100644 --- a/README.md +++ b/README.md @@ -92,10 +92,10 @@ This will install PyStack in the virtual environment in development mode (the `- `pip install` command), and then install the Python libraries needed to test it, lint it, and generate its documentation. -If you plan to contribute back, you should install the pre-commit hooks: +If you plan to contribute back, you should install the prek (pre-commit) hooks: ```shell -pre-commit install +prek install ``` This will ensure that your contribution passes our linting checks. diff --git a/requirements-extra.txt b/requirements-extra.txt index 19921e61..aedb06c0 100644 --- a/requirements-extra.txt +++ b/requirements-extra.txt @@ -1,5 +1,5 @@ mypy bump2version towncrier -pre-commit +prek -r requirements-docs.txt