-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path.pre-commit-config.yaml
83 lines (73 loc) · 2.53 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
# For documentation on pre-commit usage, see https://pre-commit.com/
# This file should be updated quarterly by a developer running `pre-commit autoupdate`
# with changes added and committed.
# This will run all defined formatters prior to adding a commit.
default_language_version:
python: python3 # or python3.10 to set a specific default version
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/DanielNoord/pydocstringformatter
rev: 'v0.7.3'
hooks:
- id: pydocstringformatter
- repo: https://github.com/PyCQA/autoflake
rev: v2.2.0
hooks:
- id: autoflake
- repo: https://github.com/psf/black
rev: '24.1.1'
hooks:
- id: black
# It is recommended to specify the latest version of Python
# supported by your project here, or alternatively use
# pre-commit's default_language_version, see
# https://pre-commit.com/#top_level-default_language_version
# Pre-commit hook info from: https://black.readthedocs.io/en/stable/integrations/source_version_control.html
# Editor integration here: https://black.readthedocs.io/en/stable/integrations/editors.html
- repo: https://github.com/adamchainz/blacken-docs
rev: "v1.12.1" # replace with latest tag on GitHub
hooks:
- id: blacken-docs
additional_dependencies:
- black>=22.12.0
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: 'v4.5.0'
hooks:
- id: trailing-whitespace
exclude: .git/COMMIT_EDITMSG
- id: end-of-file-fixer
exclude: .git/COMMIT_EDITMSG
- id: detect-private-key
- id: debug-statements
- id: check-json
- id: pretty-format-json
- id: check-yaml
- id: name-tests-test
- id: requirements-txt-fixer
- repo: https://github.com/pre-commit/pygrep-hooks
rev: 'v1.10.0'
hooks:
- id: python-no-eval
- id: python-no-log-warn
- id: python-use-type-annotations
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.4
hooks:
- id: remove-crlf
- id: remove-tabs # defaults to: 4
exclude: .git/COMMIT_EDITMSG
- repo: https://github.com/PyCQA/isort.git
rev: 5.13.2
hooks:
- id: isort
args: [ "--profile", "black" ]
- repo: https://github.com/PyCQA/bandit
rev: '1.7.7'
hooks:
- id: bandit
args: ["--skip", "B101,B106,B107,B301,B311,B105,B608,B403"]