-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
66 lines (61 loc) · 1.84 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
repos:
# Other file formatting, plus common Git mistakes & text file standardization:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.2.0
hooks:
- id: check-added-large-files # Don't accidentally commit giant files.
- id: check-merge-conflict # Watch for lingering merge markers.
- id: check-yaml # Validate all YAML files.
- id: check-case-conflict # Avoid case sensitivity in file names.
- id: debug-statements # Watch for lingering debugger calls.
- id: end-of-file-fixer # Ensure there's a newline at EOF.
- id: mixed-line-ending # Only newlines, no line-feeds.
- id: trailing-whitespace # Remove trailing whitespace.
- id: name-tests-test # Follow PyTest naming convention.
# Make sure import statements are sorted uniformly.
- repo: https://github.com/PyCQA/isort
rev: 5.10.1
hooks:
- id: isort
# Check for PEP8 non-compliance, code complexity, style, errors, etc:
- repo: https://github.com/PyCQA/flake8
rev: 4.0.1
hooks:
- id: flake8
args:
# make line length compatible with black
- "--max-line-length=119"
- "--max-complexity=18"
- "--select=B,C,E,F,W,T4,B9"
additional_dependencies:
- flake8-docstrings
- flake8-colors
- pydocstyle
- flake8-builtins
- mccabe
- pep8-naming
- pycodestyle
- pyflakes
- flake8-use-fstring
# Format the code
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: black
args:
- --line-length=119
- --exclude="""\.git |
\.__pycache__|
\.mypy_cache|
\.tox|
\.venv|
_build|
\.vscode|
\.pytest_cache|
data|
notebooks|
references|
reports|
sql_queries|
dist"""
language_version: python3.9