-
Notifications
You must be signed in to change notification settings - Fork 46
/
.pre-commit-config.yaml
77 lines (77 loc) · 2.22 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
---
# For more information see
# https://pre-commit.com/index.html#install
# https://pre-commit.com/index.html#automatically-enabling-pre-commit-on-repositories
default_language_version:
# force all unspecified python hooks to run python3
python: python3
node: 17.9.0
repos:
- repo: "https://github.com/pre-commit/pre-commit-hooks"
rev: v4.6.0
hooks:
- id: check-ast
- id: check-docstring-first
- id: check-toml
- id: check-merge-conflict
- id: check-yaml
- id: end-of-file-fixer
- id: fix-byte-order-marker
- id: mixed-line-ending
- id: trailing-whitespace
args:
- "--markdown-linebreak-ext=md"
- repo: "https://github.com/pre-commit/pygrep-hooks"
rev: v1.10.0
hooks:
- id: python-check-blanket-noqa
- id: python-check-blanket-type-ignore
- id: python-use-type-annotations
- repo: "https://github.com/pycqa/isort"
rev: 5.13.2
hooks:
- id: isort
- repo: "https://github.com/psf/black"
rev: 24.4.2
hooks:
- id: black
- repo: "https://github.com/pre-commit/mirrors-prettier"
rev: v3.1.0
hooks:
- id: prettier
exclude_types:
- "python"
additional_dependencies:
- "prettier"
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.4.4
hooks:
# Run the linter.
- id: ruff
# No auto-fix
# args: [ --fix ]
# Don't Run the formatter.
# - id: ruff-format
- repo: "https://github.com/asottile/pyupgrade"
rev: e695ecd365119ab4e5463f6e49bea5f4b7ca786b
# lock to v2.31.0 (must specify the git hash), v2.32.0 requires python >= 3.7
hooks:
- id: pyupgrade
exclude: "^creation/web_base/gconfig.py$"
# needs to be py2.7 compatible
args:
- "--py36-plus"
- repo: "https://github.com/fsfe/reuse-tool"
rev: v3.0.2
hooks:
- id: reuse
additional_dependencies:
- python-debian==0.1.40
# sort-all requires python 3.8+, uncomment when we are compatible
# - repo: "https://github.com/aio-libs/sort-all"
# rev: v1.1.0
# hooks:
# - id: sort-all
# language_version: "3.8"