-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.pre-commit-config.yaml
97 lines (96 loc) · 2.97 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
# 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.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: mixed-line-ending
- id: check-case-conflict
# - id: check-executables-have-shebangs
# - id: check-shebang-scripts-are-executable
# - id: fix-byte-order-marker
# - id: fix-encoding-pragma
- id: check-yaml
# - id: pretty-format-json
- id: check-merge-conflict
- id: check-vcs-permalinks
- id: detect-private-key
- id: debug-statements
- id: check-docstring-first
# - id: name-tests-test
- id: check-toml
- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.11.0
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.15.0
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.7.0
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
# disable B101 (Test for use of assert)
args: ["-s", "B101"]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.7.1
hooks:
- id: mypy