Skip to content

Commit

Permalink
Improve precommit config to apply fixes locally (#209)
Browse files Browse the repository at this point in the history
* Remove --check

* lint -> precommit

* Run all hooks except no-commit-to-branch in CI
  • Loading branch information
wjbenfold authored Jan 14, 2022
1 parent 63d5b2c commit a210133
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
8 changes: 3 additions & 5 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,10 @@ task:
image: python:latest
cpu: 2
memory: 4G
name: "${CIRRUS_OS}: linting"
lint_script:
name: "${CIRRUS_OS}: precommit hooks"
precommit_script:
- python -m pip install --retries 3 pre-commit
- pre-commit run --all-files black
- pre-commit run --all-files flake8
- pre-commit run --all-files isort
- SKIP="no-commit-to-branch" pre-commit run --all-files


#
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ repos:
- id: black
# Force black to run on whole repo, using settings from pyproject.toml
pass_filenames: false
args: ["--config=./pyproject.toml", "--check", "."]
args: ["--config=./pyproject.toml", "."]
- repo: https://github.com/PyCQA/flake8
rev: "4.0.1"
hooks:
Expand All @@ -34,4 +34,4 @@ repos:
hooks:
- id: isort
name: isort
args: ["--filter-files", "--check"]
args: ["--filter-files"]

0 comments on commit a210133

Please sign in to comment.