Skip to content

Commit a210133

Browse files
authored
Improve precommit config to apply fixes locally (#209)
* Remove --check * lint -> precommit * Run all hooks except no-commit-to-branch in CI
1 parent 63d5b2c commit a210133

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

.cirrus.yml

+3-5
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,10 @@ task:
3333
image: python:latest
3434
cpu: 2
3535
memory: 4G
36-
name: "${CIRRUS_OS}: linting"
37-
lint_script:
36+
name: "${CIRRUS_OS}: precommit hooks"
37+
precommit_script:
3838
- python -m pip install --retries 3 pre-commit
39-
- pre-commit run --all-files black
40-
- pre-commit run --all-files flake8
41-
- pre-commit run --all-files isort
39+
- SKIP="no-commit-to-branch" pre-commit run --all-files
4240

4341

4442
#

.pre-commit-config.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ repos:
2222
- id: black
2323
# Force black to run on whole repo, using settings from pyproject.toml
2424
pass_filenames: false
25-
args: ["--config=./pyproject.toml", "--check", "."]
25+
args: ["--config=./pyproject.toml", "."]
2626
- repo: https://github.com/PyCQA/flake8
2727
rev: "4.0.1"
2828
hooks:
@@ -34,4 +34,4 @@ repos:
3434
hooks:
3535
- id: isort
3636
name: isort
37-
args: ["--filter-files", "--check"]
37+
args: ["--filter-files"]

0 commit comments

Comments
 (0)