-
Notifications
You must be signed in to change notification settings - Fork 2
/
.pre-commit-config.yaml
104 lines (103 loc) · 3.07 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
# Skip execution of one or more hooks using the SKIP environment variable:
# $ SKIP=pylint git commit -m "foo"
# $ SKIP=mypy,pylint pre-commit run --all-files
#
# If want to disable all hooks while committing, use the --no-verify/-n option:
# $ git commit -n -m "foo"
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: mixed-line-ending
- id: check-case-conflict
- id: check-yaml
- id: check-merge-conflict
- id: check-vcs-permalinks
- id: detect-private-key
- id: debug-statements
- id: check-docstring-first
- id: check-toml
- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.8.1
hooks:
- id: markdownlint-cli2-fix
name: markdownlint-cli2-fix (in place fixes)
- repo: https://github.com/leoll2/copyright_notice_precommit
rev: 0.1.1
hooks:
- id: copyright-notice
args: [--notice=COPYRIGHT]
files: python
- repo: https://github.com/asottile/pyupgrade
rev: v3.10.1
hooks:
- id: pyupgrade
args: [--py38-plus]
# exclude: *fixtures
- repo: https://github.com/PyCQA/autoflake
rev: v2.2.1
hooks:
- id: autoflake
args:
- --in-place
- --expand-star-imports
- --remove-all-unused-imports
- --ignore-init-module-imports
- --remove-duplicate-keys
- --remove-unused-variables
- --remove-rhs-for-unused-variables
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
name: isort (black profile, in place fixes)
args: ["--profile", "black", "--filter-files"]
- repo: https://github.com/DanielNoord/pydocstringformatter
rev: v0.7.3
hooks:
- id: pydocstringformatter
- repo: https://github.com/asottile/yesqa
rev: v1.5.0
hooks:
- id: yesqa
- repo: https://github.com/psf/black
rev: 23.9.1
hooks:
- id: black
name: black (in place fixes)
# args: [--diff, --check]
# 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
# language_version: python3.11
- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
hooks:
- id: flake8
additional_dependencies: [Flake8-pyproject]
- repo: https://github.com/PyCQA/bandit
rev: 1.7.5
hooks:
- id: bandit
name: bandit (checksig)
exclude: ".*test.*"
language: python
types: [python]
- repo: https://github.com/PyCQA/bandit
rev: 1.7.5
hooks:
- id: bandit
name: bandit (tests)
# for the test folder disable
# B101, Test for use of assert
args: ["--skip", "B101,B311"]
exclude: checksig
language: python
types: [python]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.5.1
hooks:
- id: mypy