Skip to content

Commit

Permalink
add precommit
Browse files Browse the repository at this point in the history
  • Loading branch information
cokelaer committed Dec 12, 2023
1 parent 2bf0d10 commit c980933
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@

files: '\.(py|rst|sh)$'
fail_fast: false

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
#- id: check-executables-have-shebangs
- id: check-ast

- repo: https://github.com/pycqa/flake8
rev: 6.1.0
hooks:
- id: flake8
args: ["-j8", "--ignore=E203,E501,W503,E722", "--max-line-length=120", "--exit-zero"]

- repo: https://github.com/psf/black
rev: 22.10.0
hooks:
- id: black
args: ["--line-length=120"]
exclude: E501

- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
args: ["--profile", "black"] # solves conflicts between black and isort

0 comments on commit c980933

Please sign in to comment.