-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
154 lines (154 loc) · 5.05 KB
/
.pre-commit-config.yaml
File metadata and controls
154 lines (154 loc) · 5.05 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
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
152
153
154
---
default_install_hook_types: [pre-commit, commit-msg]
default_stages: [pre-commit]
ci:
autofix_prs: false
autoupdate_schedule: quarterly
skip:
- pylint
# - pyright
# - pyright-verifytypes
- pyroma
- poetry-lock
- poetry-audit
- poetry-check
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # frozen: v6.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]
- 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=15000, --enforce-all]
- id: forbid-submodules
- id: pretty-format-json
args: [--autofix, --indent=4]
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: ad1b27d73581aa16cca06fc4a0761fc563ffe8e8 # frozen: v1.5.6
hooks:
- id: remove-tabs
- id: forbid-tabs
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: ed81924a8b1cecdaa570b072528fa80c9c4d6ccd # frozen: 0.37.1
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: 694e2c0dfb4253d51f3c6c54b8f9fec0a16764dc # frozen: v1.7.11.24
hooks:
- id: actionlint
additional_dependencies: [pyflakes, shellcheck-py]
- repo: https://github.com/commitizen-tools/commitizen
rev: 4fbeae7861663ecf4b4989211eba41c1a3fb1227 # frozen: v4.13.9
hooks:
- id: commitizen
stages: [commit-msg]
- repo: https://github.com/lyz-code/yamlfix
rev: f857ca370af3db7e5e181373d45c06a148fac3f8 # frozen: 1.19.1
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: 2d496dbc18e31b83a1596685347ffe0b6041daf0 # frozen: 1.0.0
hooks:
- id: mdformat
args: [--number, --end-of-line, keep, --ignore-missing-references]
additional_dependencies:
- setuptools==80.9.0 # This is required since Python 3.12 no longer installs setuptools by default in virtual environments
- 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-front-matters
- mdformat-gfm
- mdformat-gfm-alerts
- mdformat-mkdocs
- mdformat-shfmt
- mdformat-simple-breaks
- mdformat-toc
- mdformat-web
- mdformat-wikilink
- repo: https://github.com/pappasam/toml-sort
rev: 2970ae9bb7124fe5117a27e10c10d2da051ce05a # frozen: v0.24.4
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 # TODO: enable
# name: pyright
# entry: pyright
# language: system
# types: [python]
# pass_filenames: false
# - id: pyright-verifytypes # TODO: enable
# name: pyright-verifytypes
# entry: pyright
# language: system
# types: [python]
# pass_filenames: false
# args: [--verifytypes, tm_data_types, --ignoreexternal]
- id: pyroma
name: pyroma
entry: pyroma
language: system
types: [python]
pass_filenames: false
always_run: true
args: [., --min=10]
- id: poetry-lock
name: poetry-lock
entry: poetry lock
language: system
pass_filenames: false
always_run: true
files: ^(.*/)?(poetry\.lock|pyproject\.toml)$
- id: poetry-audit
name: poetry-audit
entry: poetry audit
language: system
pass_filenames: false
files: ^(.*/)?(poetry\.lock|pyproject\.toml)$
always_run: true
args: [--json, --ignore-code=CVE-2019-8341]
- id: poetry-check
name: poetry-check
entry: poetry check
language: system
pass_filenames: false
files: ^(.*/)?(poetry\.lock|pyproject\.toml)$
# args: [--strict] # TODO: enable this when poetry can be updated to v2+
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: aca6d4c8045a504e2812ea4bedff1d0a09e437bc # frozen: v0.15.8
hooks:
- id: ruff-check
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
- repo: https://github.com/PyCQA/docformatter
rev: e73b8ba0c1316be565983236c72e653ad44e6b66 # frozen: v1.7.7
hooks:
- id: docformatter
additional_dependencies: [tomli]