-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
118 lines (105 loc) · 2.99 KB
/
.pre-commit-config.yaml
File metadata and controls
118 lines (105 loc) · 2.99 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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
repos:
- repo: local
hooks:
- id: jupyter-nb-clear-output
name: jupyter-nb-clear-output
files: \.ipynb$
language: system
entry: poetry run jupyter nbconvert --ClearOutputPreprocessor.enabled=True --inplace
- id: remove-comments-from-nbdev-lib
name: remove-comments-from-nbdev-lib
files: \.py$
language: system
entry: sed -i -r 's/# (%%|AUTOGENERATED).*//g'
- repo: https://github.com/koalaman/shellcheck-precommit
rev: v0.11.0
hooks:
- id: shellcheck
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.45.0
hooks:
- id: markdownlint
args: [--config, .markdownlint.json]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- repo: https://github.com/nbQA-dev/nbQA
rev: 1.9.1
hooks:
- id: nbqa-pyupgrade
- id: nbqa-isort
- id: nbqa-black
- id: nbqa-flake8
- id: nbqa-pydocstyle
- id: nbqa
entry: poetry run nbqa mypy --ignore-missing-imports
name: nbqa-mypy
alias: nbqa-mypy
additional_dependencies: [mypy==1.18.2]
- id: nbqa
entry: poetry run nbqa bandit
name: nbqa-bandit
alias: nbqa-bandit
additional_dependencies: [bandit==1.8.6]
- id: nbqa-pylint
args:
[
--disable=import-error,
--disable=pointless-statement,
--disable=invalid-name,
--disable=expression-not-assigned,
--disable=too-many-lines,
]
- repo: https://github.com/asottile/seed-isort-config
rev: v2.2.0
hooks:
- id: seed-isort-config
additional_dependencies: ["isort[toml]"]
args: [--settings-path, .]
files: ^src/.*\.py$
- repo: https://github.com/pre-commit/mirrors-isort
rev: v5.10.1
hooks:
- id: isort
additional_dependencies: ["isort[toml]"]
args: [--settings-path, ., --skip-glob, tests/.*.py]
- repo: https://github.com/ambv/black
rev: 25.9.0
hooks:
- id: black
# - repo: local
# hooks:
# - id: fix-string-concat-in-nbdev-lib
# name: fix-string-concat-in-nbdev-lib
# files: \.py$
# language: system
# entry: sed -i -r 's/ " "/ /g'
- repo: https://github.com/pycqa/flake8
rev: 7.3.0
hooks:
- id: flake8
- repo: https://github.com/pycqa/pydocstyle
rev: 6.3.0
hooks:
- id: pydocstyle
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.18.2
hooks:
- id: mypy
files: \.py$
- repo: https://github.com/PyCQA/bandit
rev: 1.8.6
hooks:
- id: bandit
args: [-c, .bandit, -r, src]
- repo: local
hooks:
- id: pylint
name: pylint
entry: poetry run pylint
language: system
types: [python]
exclude: ^.*\b(_modidx.py)\b.*$
args: [--rcfile, .pylintrc, --ignore, migrations]