-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
88 lines (80 loc) · 2.92 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
fail_fast: false
default_language_version:
python: python3.11
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: debug-statements
- id: check-ast
- id: check-json
- id: detect-private-key
- id: check-yaml
- id: check-added-large-files
- id: end-of-file-fixer
- id: trailing-whitespace
# - id: double-quote-string-fixer
- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
- id: black
name: black
entry: black
language: system
types: [python]
args: [--line-length=100]
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
args: [--line-length=100,
--profile=black]
- repo: local
hooks:
- id: pylint
name: pylint
entry: pylint
language: system
types: [python]
exclude: ^venv/ ^.git/ ^.idea/ ^.DS_Store/ ^.ipynb_checkpoints
args: [--max-line-length=100,
--disable=no-name-in-module, # pylint has some issues understanding dataclasses
--disable=no-member,
--disable=import-error,
--disable=missing-class-docstring,
--disable=missing-function-docstring, # some classes/functions are self-explanatory
--disable=too-few-public-methods,
--disable=syntax-error, # E0001: Parsing failed: 'invalid syntax ...'
--disable=fixme, # W0511
--disable=unused-private-member, # W0238: Test classes
--disable=attribute-defined-outside-init, # idem below
--disable=redefined-outer-name, # W0621: test fixtures are injecting from out of the scope
--disable=pointless-string-statement, # for allowing temporary draft code
--disable=no-self-argument, # incompatible with cls arg in pydantic validation
--disable=too-many-locals,
--disable=unexpected-keyword-arg, # bug when heritage
--disable=too-many-arguments,
--disable=missing-timeout,
--disable=too-many-function-args, # for some reason this is appearing for just one arg
--disable=too-many-lines,
--disable=duplicate-code,
--disable=logging-fstring-interpolation,
--disable=broad-exception-caught
]
- repo: https://github.com/PyCQA/autoflake
rev: v2.1.1
hooks:
- id: autoflake
- repo: https://github.com/dhruvmanila/remove-print-statements
rev: v0.5.2
hooks:
- id: remove-print-statements
args: ['--verbose'] # Show all the print statements to be removed
- repo: local
hooks:
- id: mypy
name: mypy
entry: bash -c 'mypy "$@" || true' --
language: system
types: [python]
exclude: ^venv/ ^.git/ ^.idea/ ^.DS_Store/ ^.ipynb_checkpoints/