-
Notifications
You must be signed in to change notification settings - Fork 20
/
.pre-commit-config.yaml
146 lines (146 loc) · 4.79 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
145
146
---
default_install_hook_types: [pre-commit, commit-msg]
default_stages: [pre-commit]
ci:
autofix_prs: false
autoupdate_schedule: quarterly
skip:
- check-poetry
- pylint
- pyright
- pyright-verifytypes
- pyroma
- poetry-audit
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: cef0300fd0fc4d2a87a85fa2093c6b283ea36f4b # frozen: v5.0.0
hooks:
- id: check-yaml
args: [--unsafe]
- id: check-toml
- id: check-json
- id: check-xml
- id: file-contents-sorter
files: ^(docs/known_words.txt)$
args: [--unique, --ignore-case]
- id: requirements-txt-fixer
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-case-conflict
- id: check-merge-conflict
- id: check-added-large-files
args: [--maxkb=3000, --enforce-all]
- id: forbid-submodules
- id: pretty-format-json
args: [--autofix, --indent=4]
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: a30f0d816e5062a67d87c8de753cfe499672b959 # frozen: v1.5.5
hooks:
- id: remove-tabs
- id: forbid-tabs
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 37cd56d9d154dfb0648eaee8efc1040512700c47 # frozen: 0.29.4
hooks:
- id: check-readthedocs
- id: check-dependabot
- id: check-github-actions
- id: check-github-workflows
args: [--verbose]
- repo: https://github.com/Mateusz-Grzelinski/actionlint-py
rev: 27445053da613c660ed5895d9616662059a53ca7 # frozen: v1.7.3.17
hooks:
- id: actionlint
additional_dependencies: [pyflakes, shellcheck-py]
- repo: https://github.com/commitizen-tools/commitizen
rev: bfe422faef54a78ff8c0ce5dea0da053159c9f9d # frozen: v3.30.0
hooks:
- id: commitizen
stages: [commit-msg]
- repo: https://github.com/lyz-code/yamlfix
rev: 8072181c0f2eab9f2dd8db2eb3b9556d7cd0bd74 # frozen: 1.17.0
hooks:
- id: yamlfix
- repo: https://github.com/thibaudcolas/curlylint
rev: 71adf4d34c290684fd9f94a4d21ac55bcfe640f0 # frozen: v0.13.1
hooks:
- id: curlylint
- repo: https://github.com/executablebooks/mdformat
rev: 08fba30538869a440b5059de90af03e3502e35fb # frozen: 0.7.17
hooks:
- id: mdformat
args: [--number, --end-of-line, keep, --ignore-missing-references]
additional_dependencies:
- setuptools # This is required since Python 3.12 no longer installs setuptools by default in virtual environments
- mdformat-admon
- mdformat-black # This may need to be updated/removed in the future once ruff supports formatting python code blocks in markdown
- mdformat-beautysh
- mdformat-config
- mdformat-footnote
- mdformat-frontmatter
- mdformat-gfm
- mdformat-gfm-alerts
- mdformat-mkdocs
- mdformat-shfmt
- mdformat-simple-breaks
- mdformat-tables
- mdformat-toc
- mdformat-web
- mdformat-wikilink
- repo: https://gitlab.com/smop/pre-commit-hooks
rev: df034f88cf92b394e6f00a78fa97a2aa4e270e60 # frozen: v1.0.0
hooks:
- id: check-poetry
- repo: https://github.com/pappasam/toml-sort
rev: b9b6210da457c38122995e434b314f4c4a4a923e # frozen: v0.23.1
hooks:
- id: toml-sort-fix
- repo: local
hooks:
- id: pylint
name: pylint
entry: pylint
language: system
types: [python]
pass_filenames: true
args: [-sn]
- id: pyright
name: pyright
entry: pyright
language: system
types: [python]
pass_filenames: false
- id: pyright-verifytypes
name: pyright-verifytypes
entry: pyright
language: system
types: [python]
pass_filenames: false
args: [--verifytypes, tm_devices, --ignoreexternal]
- id: pyroma
name: pyroma
entry: pyroma
language: system
types: [python]
pass_filenames: false
always_run: true
args: [., --min=10]
- id: poetry-audit
name: poetry-audit
entry: poetry
language: system
types: [toml]
pass_filenames: false
always_run: true
args: [audit, --json, --ignore-code=CVE-2019-8341]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 52c175db9e13515a6b086cd53ce8a66599eac64b # frozen: v0.7.2
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
# TODO: Re-enable this once https://github.com/PyCQA/docformatter/issues/293 is resolved
# - repo: https://github.com/PyCQA/docformatter
# rev: dfefe062799848234b4cd60b04aa633c0608025e # frozen: v1.7.5
# hooks:
# - id: docformatter
# additional_dependencies: [tomli]