Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,27 +55,28 @@ repos:
args: [--config-file, pyproject.toml]

# Enable a whole bunch of useful helper hooks, too.
# See https://pre-commit.com/hooks.html for more hooks.
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # frozen: v6.0.0
# See https://prek.j178.dev/builtin
- repo: builtin
hooks:
- id: check-ast
# missing - id: check-ast
- id: check-case-conflict
- id: check-merge-conflict
- id: check-added-large-files
stages: [pre-commit]
args: [--maxkb=500]
- id: debug-statements
# issing - id: debug-statements
- id: end-of-file-fixer
stages: [pre-commit]
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
stages: [pre-commit]
- id: detect-private-key
- id: detect-aws-credentials
args: [--allow-missing-credentials]
# missing - id: detect-aws-credentials
# args: [--allow-missing-credentials]
- id: check-yaml
- id: check-toml
# https://github.com/j178/prek/issues/38
# https://github.com/j178/prek/issues/2355
- repo: https://github.com/pre-commit/pygrep-hooks
rev: 3a6eb0fadf60b3cccfd80bad9dbb6fae7e47b316 # frozen: v1.10.0
hooks:
Expand Down
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ venv:
# See https://packaging.python.org/en/latest/tutorials/packaging-projects/#generating-distribution-archives.
.PHONY: setup
setup: force-upgrade
python -m pre_commit install
python -m prek install
mkdir -p dist

# Install or upgrade an existing virtual environment based on the
Expand Down Expand Up @@ -167,15 +167,15 @@ audit:
.PHONY: check check-code check-ruff check-lint check-mypy check-actionlint
check-code: check-ruff check-lint check-mypy check-actionlint
check-ruff:
python -m pre_commit run ruff --all-files
python -m prek run ruff --all-files
check-lint:
python -m pre_commit run pylint --all-files
python -m prek run pylint --all-files
check-mypy:
python -m pre_commit run mypy --all-files
python -m prek run mypy --all-files
check-actionlint:
python -m pre_commit run actionlint --all-files
python -m prek run actionlint --all-files
check:
python -m pre_commit run --all-files
python -m prek run --all-files

# Run different kinds of tests: unit tests, integration tests, performance tests.
# Note that the default goal 'test' runs the unit tests only, mainly for convenience
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ dist = [
"flit >=3.2.0,<4.0.0",
]
hooks = [
"pre-commit >=4.0.0,<4.7.0",
"prek >=0.4.0,<0.5.0",
]


Expand Down
Loading