-
Notifications
You must be signed in to change notification settings - Fork 662
/
.pre-commit-config.yaml
60 lines (57 loc) · 1.76 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
# Learn more about this config here: https://pre-commit.com/
# To enable these pre-commit hook run:
# `brew install pre-commit` or `python3 -m pip install pre-commit`
# Then in the project root directory run `pre-commit install`
# default_language_version:
# python: python3.10
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-builtin-literals
- id: check-executables-have-shebangs
- id: check-shebang-scripts-are-executable
- id: check-yaml
- id: detect-private-key
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace
- repo: https://github.com/PyCQA/bandit
rev: 1.7.8
hooks:
- id: bandit
args:
- --skip=B104,B105,B108,B110,B301,B310,B321,B324,B402,B403,B404,B602,B603,B604,B605,B607,B701
- repo: https://github.com/python/black
rev: 24.4.2
hooks:
- id: black
args: [--skip-string-normalization]
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
# See args in setup.cfg
- repo: https://github.com/PyCQA/flake8
rev: 7.0.0
hooks:
- id: flake8
additional_dependencies: [flake8-2020, flake8-bugbear, flake8-comprehensions, flake8-return]
args:
- --builtins=_
- --count
- --max-complexity=68
- --max-line-length=125
- --select=C901,E501,E9,F63,F7,F82
- --show-source
- --statistics
- repo: https://github.com/timothycrosley/isort
rev: 5.13.2
hooks:
- id: isort
args: ["--profile", "black", "--filter-files"]
- repo: https://github.com/asottile/pyupgrade
rev: v3.15.2
hooks:
- id: pyupgrade
args: [--py37-plus]