-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
83 lines (73 loc) · 1.81 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
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
exclude: ^devenv/scripts/debug\.py$
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
# Misc checks
- id: no-commit-to-branch
name: no commit to main or release branches
args:
- --branch=main
- --pattern=^rel/
- id: check-added-large-files
args: ["--maxkb=360"]
- id: check-merge-conflict
- id: check-case-conflict
- id: fix-byte-order-marker
# Check executables
- id: check-shebang-scripts-are-executable
- id: check-executables-have-shebangs
# Check symlinks
#- id: check-symlinks
#- id: destroyed-symlinks
# Check syntax
- id: check-yaml
args: [--unsafe]
# - id: check-json
#- id: check-toml
#- id: check-xml
# Fix whitespace
- id: trailing-whitespace
- id: end-of-file-fixer
- id: mixed-line-ending
args: [--fix=lf]
# Python specific checks
- id: check-ast
- id: check-docstring-first
- id: requirements-txt-fixer
- id: debug-statements
- id: fix-encoding-pragma
args: ["--remove"]
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
args: [--profile=black]
- repo: https://github.com/asottile/pyupgrade
rev: v3.15.0
hooks:
- id: pyupgrade
args:
- --py311-plus
- repo: https://github.com/psf/black
rev: 23.10.1
hooks:
- id: black
- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
hooks:
- id: flake8
args:
- --max-line-length=88
additional_dependencies:
- flake8-broken-line==1.0.0
- flake8-bugbear==23.9.16
- flake8-comprehensions==3.14.0
- flake8-debugger==4.1.2
- flake8-logging-format==0.9.0
- flake8-mutable==1.2.0
- flake8-noqa==1.3.2
- flake8-printf-formatting==1.1.2
- flake8-unused-arguments==0.0.13