Skip to content

Commit 2f33fb9

Browse files
DaniBodorsjvrijn
authored andcommitted
perform ruff format check (in addition to linting) in workflow and in pre-commit hook
also explicitly call `ruff check` rather than deprecated `ruff .`
1 parent 3ce8ff9 commit 2f33fb9

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

{{cookiecutter.directory_name}}/.githooks/pre-commit

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ echo "Script $0 triggered ..."
66
echo "Starting ruff analysis..."
77

88
# quietly run ruff
9-
ruff check . --fix
9+
ruff check --fix
10+
ruff format
1011

1112
# use return code to abort commit if necessary
1213
if [ $? != "0" ]; then

{{cookiecutter.directory_name}}/.github/workflows/build.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,6 @@ jobs:
5959
python -m pip install --upgrade pip setuptools
6060
python -m pip install .[dev,publishing]
6161
- name: Check style against standards using ruff
62-
run: ruff .
62+
run: |
63+
ruff check
64+
ruff format --check

0 commit comments

Comments
 (0)