-
-
Notifications
You must be signed in to change notification settings - Fork 115
/
.pre-commit-config.yaml
76 lines (67 loc) · 2.04 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
# To use pre-commit, install the tool, perhaps using pipx or perhaps
# adding it to a virtual environment you use for the repository.
#
# pipx install pre-commit
#
# Then, run this command to install the tool as a git pre-commit hook:
#
# pre-commit install
#
# Then, whenever you modify a file (or files) in the repository,
# pre-commit will run the configured hooks against the modified files.
# If the files are modified by the hooks, the git commit will fail and
# you'll have an opportunity to review and stage the changes made by the
# hooks.
#
# To format all files in this repo, you can run this command
# (but be aware that sometimes the command must be run multiple times
# because pyupgrade has several stepping-stone upgrades to apply).
#
# pre-commit run -a
#
# I strongly recommend enabling pre-commit.ci, which -- like coveralls
# -- will automatically run an additional action against incoming PRs.
# If the PRs do not comply to
ci:
autoupdate_schedule: "quarterly"
default_language_version:
python: "python3"
repos:
- repo: "meta"
hooks:
- id: "check-hooks-apply"
- id: "check-useless-excludes"
- repo: "https://github.com/pre-commit/pre-commit-hooks"
rev: "v5.0.0"
hooks:
- id: "check-added-large-files"
- id: "check-merge-conflict"
- id: "check-yaml"
- id: "end-of-file-fixer"
- id: "mixed-line-ending"
args:
- "--fix=lf"
- id: "trailing-whitespace"
- repo: "https://github.com/asottile/pyupgrade"
rev: "v3.18.0"
hooks:
- id: "pyupgrade"
name: "Enforce Python 3.9+ idioms"
args:
- "--py39-plus"
- repo: "https://github.com/psf/black-pre-commit-mirror"
rev: "24.10.0"
hooks:
- id: "black"
- repo: "https://github.com/pycqa/isort"
rev: "5.13.2"
hooks:
- id: "isort"
- repo: "https://github.com/python-jsonschema/check-jsonschema"
rev: "0.29.4"
hooks:
- id: "check-github-workflows"
- repo: "https://github.com/rhysd/actionlint"
rev: "v1.7.3"
hooks:
- id: "actionlint"