-
Notifications
You must be signed in to change notification settings - Fork 3
/
.pre-commit-config.yaml
144 lines (134 loc) · 4.62 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
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: "9260cbc9c84c06022993bfbcc42fdbf0305c5b8e"
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-merge-conflict
- id: check-symlinks
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
- id: mixed-line-ending
- id: name-tests-test
args: ["--pytest-test-first"]
- id: trailing-whitespace
exclude: "tests/references/*"
# - repo: https://github.com/hakancelik96/unimport
# rev: 0.14.1
# hooks:
# - id: unimport
# args: [--remove, --include-star-import]
# - repo: https://github.com/pycqa/isort
# rev: "3a72e069635a865a92b8a0273aa829f630cbcd6f"
# hooks:
# - id: isort
# files: "demo_project/.*"
# args: ["--profile", "black", "--filter-files"]
- repo: https://github.com/psf/black
rev: "d9b8a6407e2f46304a8d36b18e4a73d8e0613519"
hooks:
- id: black
# - repo: https://github.com/pycqa/flake8
# rev: "647996c743f9e77368ce46cc74abe98549dd4c3a"
# hooks:
# - id: flake8
# - repo: https://github.com/kynan/nbstripout
# rev: e4c5b4dcbab4afa0b88b7a9243db42b1a8d95dde
# hooks:
# - id: nbstripout
# files: ".ipynb"
- repo: https://github.com/asottile/pyupgrade
rev: ddb39ad37166dbc938d853cc77606526a0b1622a
hooks:
- id: pyupgrade
args: [--py37-plus, --keep-runtime-typing]
# - repo: https://github.com/codespell-project/codespell
# rev: 68ea3cff5eba266e0814794cce6cd19537f58137
# hooks:
# - id: codespell
# args: ["-L TE,TE/TM,te,ba,FPR,fpr_spacing,ro,donot"]
# - repo: https://github.com/shellcheck-py/shellcheck-py
# rev: 953faa6870f6663ac0121ab4a800f1ce76bca31f
# hooks:
# - id: shellcheck
# - repo: https://github.com/pre-commit/pygrep-hooks
# rev: 7b4409161486c6956bb3206ce96db5d56731b1b9 # Use the ref you want to point at
# hooks:
# - id: python-use-type-annotations
- repo: https://github.com/PyCQA/bandit
rev: fe1361fdcc274850d4099885a802f2c9f28aca08
hooks:
- id: bandit
args: [--exit-zero]
# ignore all tests, not just tests data
exclude: ^tests/
# - repo: https://github.com/pre-commit/mirrors-mypy
# rev: "v1.0.1"
# hooks:
# - id: mypy
# exclude: ^(docs/|example-plugin/|tests/fixtures)
# additional_dependencies:
# - "pydantic"
# - repo: https://github.com/terrencepreilly/darglint
# rev: master
# hooks:
# - id: darglint
# - repo: https://github.com/pycqa/pydocstyle
# rev: "a6fe4222012e990042c86cdaaa904a8d059752ee"
# hooks:
# - id: pydocstyle
# additional_dependencies: ["pydocstyle[toml]"]
# - repo: https://github.com/asottile/reorder_python_imports
# rev: 2b2f0c74acdb3de316e23ceb7dd0d7945c354050
# hooks:
# - id: reorder-python-imports
# - repo: https://github.com/PyCQA/pylint
# rev: v2.14.1
# hooks:
# - id: pylint
# args: [--exit-zero]
# - repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
# rev: 6565d773ca281682d7062d4c0be74538cc474cc9
# hooks:
# - id: pretty-format-java
# args: [--autofix]
# - id: pretty-format-kotlin
# args: [--autofix]
# - id: pretty-format-yaml
# args: [--autofix, --indent, "2"]
# - repo: https://github.com/adrienverge/yamllint.git
# rev: v1.21.0 # or higher tag
# hooks:
# - id: yamllint
# args: [--format, parsable, --strict]
# - repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt
# rev: 0.1.0 # or specific tag
# hooks:
# - id: yamlfmt
# - repo: https://github.com/pre-commit/pygrep-hooks
# rev: "f6fb13e9516d1a9720a30a4049c930235abd642e"
# hooks:
# - id: python-check-blanket-noqa
# - id: python-check-blanket-type-ignore
# - id: python-no-log-warn
# - id: python-no-eval
# - id: python-use-type-annotations
# - id: rst-backticks
# - id: rst-directive-colons
# - id: rst-inline-touching-normal
# - repo: https://github.com/nbQA-dev/nbQA
# rev: 952c895a21aced4601165c43f77188559a5e825c
# hooks:
# - id: nbqa-black
# additional_dependencies: [jupytext, black] # optional, only if you're using Jupytext
# - id: nbqa-pyupgrade
# args: ["--py37-plus"]
# - id: nbqa-flake8
# - id: nbqa-isort
# args: ["--float-to-top"]
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: "6a0ba1854991b693612486cc84a2254de82d071d"
hooks:
- id: ruff
exclude: tests/generate_references.py