-
Notifications
You must be signed in to change notification settings - Fork 40
/
Copy path.pre-commit-config.yaml
58 lines (54 loc) · 2 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
language_version: python3
exclude: \.csv$
- id: end-of-file-fixer
- id: debug-statements
language_version: python3
- repo: https://github.com/asottile/reorder_python_imports
rev: v3.14.0
hooks:
- id: reorder-python-imports
language_version: python3
- repo: https://github.com/psf/black
rev: 23.12.1
hooks:
- id: black
args:
- --safe
- --quiet
- --line-length
- "120" # same as pylint below
language_version: python3
require_serial: true
- repo: https://github.com/asottile/pyupgrade
rev: v2.38.4
hooks:
- id: pyupgrade
language_version: python3
# E0401 - import errors (Used when pylint has been unable to import a module.)
# C0411 - wrong-import-order, disabled because of conflicts with black
# W1203, W1201 - Use %s formatting in logging functions (Read more: https://github.com/PyCQA/pylint/issues/2354)
# W0603 - Using the global statement
# C0114,C0115,C0116 - docstring checks. Disabled because of pydocstyle checks
# W0107 - unnecessary pass
# W0511: fixme
# W0702: No exception type(s) specified (bare-except)
# R0801: Similar lines in 2 files. Disabled because it flags any file even those which are unrelated
# R1705: Unnecessary "elif" after "return", remove the leading "el" from "elif" (no-else-return)
# R1710: Either all return statements in a function should return an expression, or none of them should. (inconsistent-return-statements)
- repo: https://github.com/PyCQA/pylint
#rev: v3.0.3
rev: v2.17.7
hooks:
- id: pylint
exclude: ^tests/
args:
- --max-line-length=120
- --min-public-methods=0
- --good-names=o,w,q,f,fp,i,e
- --disable=E0401,W1201,W1203,C0114,C0115,C0116,C0411,W0107,W0511,W0702,R0801,R1705,R1710
language_version: python3