-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
103 lines (93 loc) · 2.86 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
103 lines (93 loc) · 2.86 KB
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
hooks:
- id: trailing-whitespace
exclude: (^docs/)
- id: check-docstring-first
exclude: (^docs/)
- id: check-yaml
exclude: (^docs/)
- id: check-json
exclude: (^docs/)
- id: check-added-large-files
exclude: (^docs/)
- id: check-ast
exclude: (^docs/)
- id: check-case-conflict
exclude: (^docs/)
# Flake rules: https://lintlyci.github.io/Flake8Rules/
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.4
hooks:
- id: flake8
exclude: (^docs/)
additional_dependencies: [flake8-typing-imports==1.7.0]
# E501 line too long
# E722 do not use bare 'except'
# F541 f-string is missing placeholders
# E741 ambiguous variable name 'l'
# F401 '._version.__version__' imported but unused
# F841 local variable 'e' is assigned to but never used
# W503 line break before binary operator
# E712 comparison to True should be 'if cond is True:' or 'if cond:'
args:
[
"--max-line-length=127",
"--config=setup.cfg",
"--ignore=E501,E722,F541,E741,F401,F841,W503,W391,E712",
]
# - repo: https://github.com/pre-commit/mirrors-autopep8
# rev: v1.5.4
# hooks:
# - id: autopep8
# exclude: (^docs/)
# - repo: https://github.com/asottile/add-trailing-comma
# rev: v2.1.0
# hooks:
# - id: add-trailing-comma
# args: [--py36-plus]
- repo: https://github.com/asottile/pyupgrade
rev: v2.10.0
hooks:
- id: pyupgrade
- repo: https://github.com/asottile/seed-isort-config
rev: v2.2.0
hooks:
- id: seed-isort-config
- repo: https://github.com/timothycrosley/isort
rev: "5.6.4" # Use the revision sha / tag you want to point at
hooks:
- id: isort # Run `isort -rc <filepath>` to autofix
pass_filenames: true
args: ["--profile", "black"]
- repo: https://github.com/ambv/black
rev: 20.8b1
hooks:
- id: black
language_version: python3.8
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.7.0
hooks:
- id: python-use-type-annotations
- id: python-no-eval
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.2.1
hooks:
- id: prettier
exclude: (^docs/)
- repo: https://github.com/pycqa/pylint
rev: pylint-2.6.0
hooks:
- id: pylint
entry: pylint
language: python
"types": [python]
require_serial: false
additional_dependencies: []
exclude: ^(src/|tests/|docs/)
args:
[
"--max-line-length=127",
"--disable=C0301,W1203,W0703,C0121,R1705,R0915,R0912,R0903,W0107,R1702,W0707,W0702,W0231,R1720,C0103",
]