-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy path.pre-commit-config.yaml
82 lines (82 loc) · 2.36 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-yaml
- id: check-toml
- id: check-json
- id: check-xml
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-docstring-first
- id: name-tests-test
- id: file-contents-sorter
- id: pretty-format-json
args: [ --autofix ]
- id: check-ast
- id: check-builtin-literals
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
- id: debug-statements
- id: detect-private-key
- id: no-commit-to-branch
args: [ '--branch', 'main' ]
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.30.0
hooks:
- id: check-github-workflows
args: ["--verbose"]
- id: check-renovate
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v4.0.0
hooks:
- id: conventional-pre-commit
stages: [commit-msg]
args: []
- repo: https://github.com/psf/black
rev: 24.10.0
hooks:
- id: black
language_version: python3
args: [ '--config', 'pyproject.toml' ]
- repo: https://github.com/PyCQA/autoflake
rev: v2.3.1
hooks:
- id: autoflake
args:
[
'--in-place',
'--remove-unused-variable',
'--remove-all-unused-imports',
'--expand-star-imports',
'--ignore-init-module-imports',
]
- repo: https://github.com/PyCQA/isort
rev: 5.13.2
hooks:
- id: isort
args: [ '--settings-file', 'pyproject.toml' ]
- repo: https://github.com/asottile/pyupgrade
rev: v3.19.1
hooks:
- id: pyupgrade
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
additional_dependencies:
- tomli
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.23
hooks:
- id: validate-pyproject
# Optional extra validations from SchemaStore:
additional_dependencies: [ "validate-pyproject-schema-store[all]" ]
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.14.0
hooks:
- id: pretty-format-toml
exclude: poetry.lock
args: [ --autofix ]