-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
77 lines (71 loc) · 1.94 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
67
68
69
70
71
72
73
74
75
76
77
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: check-added-large-files
- id: check-docstring-first
- id: check-merge-conflict
- id: check-toml
- id: check-yaml
- id: double-quote-string-fixer
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 22.8.0
hooks:
- id: black
args: [
'--line-length=120',
'--skip-string-normalization',
]
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
args: [
'--line-length=120',
'--profile=black',
'--filter-files',
'--force-single-line-imports',
'--reverse-relative',
]
- repo: https://github.com/PyCQA/flake8
rev: 5.0.4
hooks:
- id: flake8
additional_dependencies: [
'pycodestyle==2.9.1', # E,W
'pyflakes==2.5.0', # F
'mccabe==0.7.0', # C
'flake8-bugbear==22.9.11', # B
'flake8-builtins==1.5.3', # A
'flake8-comprehensions==3.10.0', # C4
'flake8-debugger==4.1.2', # T1
'flake8-logging-format==0.7.5', # G
'flake8-print==5.0.0', # T2
]
args: [
'--select=E,W,F,C,B,A,C4,T1,G,T2',
'--ignore=E203,W503,B008,B305,A003,G004',
'--max-complexity=10',
'--max-line-length=120',
]
# - repo: https://github.com/myint/docformatter
# rev: v1.5.0
# hooks:
# - id: docformatter
# args: [
# '--wrap-summaries=120',
# '--wrap-descriptions=120',
# '--in-place',
# ]
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.4.2
hooks:
- id: insert-license
files: \.py$
args: [
'--license-filepath=COPYRIGHT',
'--comment-style=#',
'--use-current-year',
]