-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy path.pre-commit-config.yaml
37 lines (37 loc) · 1.03 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
repos:
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: black
args:
# Prefer single quotes
- "--skip-string-normalization"
# Should be a command that runs python3.6+
language_version: python3
- repo: https://github.com/pycqa/isort
rev: 5.11.5
hooks:
- id: isort
args: ["--profile=black",
"--filter-files",
# Pycharm profile
"--force-grid-wrap=2",
"--lines-after-imports=2"]
files: \.py$
- repo: https://github.com/pycqa/flake8
rev: 3.9.2
hooks:
- id: flake8
args:
# Match Black's default line length
- "--max-line-length=88"
# E501: Line too long
# W503: line break before binary operator
# E203: colons should not have any space before them
# E731: Do not assign a lambda expression, use a def
- "--ignore=E501,W503,E203,E731"
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: double-quote-string-fixer
- id: trailing-whitespace