forked from tektronix/tm_devices
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
151 lines (151 loc) · 4.23 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
147
148
149
150
151
---
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: v4.6.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: v1.5.5
hooks:
- id: remove-tabs
- id: forbid-tabs
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.29.1
hooks:
- id: check-readthedocs
- id: check-dependabot
- id: check-github-actions
- id: check-github-workflows
args: [--verbose]
- repo: https://github.com/commitizen-tools/commitizen
rev: v3.28.0
hooks:
- id: commitizen
stages: [commit-msg]
- repo: https://github.com/adamchainz/blacken-docs
rev: 1.18.0
hooks:
- id: blacken-docs
files: \.(rst|md|markdown|tex)$
additional_dependencies: [black==24.4.2] # This may need to be updated/removed in the future once ruff supports formatting python code blocks in markdown
args: [--line-length=100]
- repo: https://github.com/lyz-code/yamlfix
rev: 1.16.0
hooks:
- id: yamlfix
# TODO: get this working
# - repo: https://github.com/motet-a/jinjalint
# rev: "0.5"
# hooks:
# - id: jinjalint
- repo: https://github.com/thibaudcolas/curlylint
rev: v0.13.1
hooks:
- id: curlylint
- repo: https://github.com/executablebooks/mdformat
rev: 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-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: v1.0.0
hooks:
- id: check-poetry
- repo: https://github.com/pappasam/toml-sort
rev: 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: v0.5.5
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
- repo: https://github.com/PyCQA/docformatter
rev: v1.7.5
hooks:
- id: docformatter
additional_dependencies: [tomli]