-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.pre-commit-config.yaml
41 lines (41 loc) · 1.28 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/pycqa/isort
# Recent version of Poetry had a breaking
# change incompatible with isort <= 5.11.4.
rev: 5.12.0
hooks:
- id: isort
args: [
'--line-width=80',
# In order to use with black.
'--profile=black',
# '--multi-line=HANGING_INDENT'
]
- repo: https://github.com/psf/black
rev: 23.1.0
hooks:
- id: black
args: [
'--line-length=80',
# Do not use double quotes.
'--skip-string-normalization'
]
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
hooks:
- id: flake8
# W503: This warning is generated when a line break
# occurs before a binary operator (such as + or -)
# E501: Try to respect --line-length,
# but don’t become crazy if you can’t.
# E203: whitespace before ':'.
# E402: module level import not at top of file.
args: ['--max-line-length=80', '--ignore=W503,E501,E203,E402']
# __init__ frequently violate F401, F403.
exclude: '__init__'