-
Notifications
You must be signed in to change notification settings - Fork 19
/
.pre-commit-config.yaml
executable file
·39 lines (35 loc) · 1.23 KB
/
.pre-commit-config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
exclude: ^(docs|tests|SnB_input_files|.github|shakenbreak/scripts|CITATION*|MANIFEST*)
repos:
# Lint and format, isort, docstrings...
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.3.7
hooks:
- id: ruff
args: [--fix]
# Remove trailing whitespace, leave empty line at end of file
- 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
# Check docstrings
- repo: https://github.com/pycqa/pydocstyle
rev: 4.0.0 # pick a git hash / tag to point to
hooks:
- id: pydocstyle
args: [-e, --count, "--convention=google", "--add-ignore=D107,D202,D400,D415,D212,D205,D417,D413"]
# Code formatting
- repo: https://github.com/psf/black # max line length 107 specified in pyproject.toml
rev: 24.2.0
hooks:
- id: black
args: [--color]
# Check code formatting
- repo: https://github.com/PyCQA/flake8
rev: 5.0.2
hooks:
- id: flake8
args: [--max-line-length, "107", "--ignore=E121,E123,E126,E203,E226,E24,E704,W503,W504,F401,E203"]