-
Notifications
You must be signed in to change notification settings - Fork 1
/
.pre-commit-config.yaml
88 lines (80 loc) · 2.14 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
78
79
80
81
82
83
84
85
86
87
88
default_language_version:
python: python3.10
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.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/asottile/pyupgrade
rev: v3.17.0
hooks:
- id: pyupgrade
args: [
'--py310-plus',
]
- repo: https://github.com/psf/black
rev: 24.8.0
hooks:
- id: black
args: [
'--line-length=120',
'--skip-string-normalization',
]
- repo: https://github.com/PyCQA/isort
rev: 5.13.2
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-use-fstring==1.4.0', # FS
'flake8-print==5.0.0', # T2
]
args: [
'--select=E,W,F,C,B,A,C4,T1,G,FS,T2',
'--ignore=E203,W503,B008,B305,A003,G004',
'--max-complexity=10',
'--max-line-length=120',
]
# - repo: https://github.com/PyCQA/docformatter
# rev: v1.7.5
# hooks:
# - id: docformatter
# args: [
# '--wrap-summaries=120',
# '--wrap-descriptions=120',
# '--in-place',
# ]
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.5
hooks:
- id: insert-license
files: \.py$
args: [
'--license-filepath=COPYRIGHT',
'--comment-style=#',
]