-
Notifications
You must be signed in to change notification settings - Fork 1
/
.pre-commit-config.yaml
79 lines (73 loc) · 2.08 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
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: check-ast
- id: check-builtin-literals
- id: check-case-conflict
- id: check-docstring-first
- id: check-json
- id: check-symlinks
- id: check-toml
- id: check-xml
- id: check-yaml
- id: destroyed-symlinks
- id: detect-private-key
- id: fix-byte-order-marker
- id: name-tests-test
- id: sort-simple-yaml
- id: mixed-line-ending
files: "\\.(py|txt|yaml|json|md|toml|lock|cfg|html|sh|js|yml)$"
- id: trailing-whitespace
files: "\\.(py|txt|yaml|json|md|toml|lock|cfg|html|sh|js|yml)$"
- repo: https://github.com/psf/black
rev: 22.6.0
hooks:
- id: black
language_version: python3 # Should be a command that runs python3.7+
types_or: [python, pyi]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.971
hooks:
- id: mypy
exclude: ^(docs/|example-plugin/|tests/fixtures)
- repo: https://github.com/pycqa/isort
rev: 5.10.1
hooks:
- id: isort
name: isort (python)
language: python
files: "\\.(py)$"
args: [--profile=black]
- repo: https://github.com/myint/docformatter
rev: v1.4
hooks:
- id: docformatter
args: [--in-place]
language: python
- repo: https://github.com/asottile/pyupgrade
rev: v2.37.3
hooks:
- id: pyupgrade
files: "\\.(py)$"
entry: pyupgrade
language: python
- repo: https://github.com/PyCQA/autoflake
rev: v1.4
hooks:
- id: autoflake
name: autoflake
entry: autoflake
language: python
require_serial: true
args:
[
--expand-star-imports,
--ignore-init-module-imports,
--in-place,
--remove-all-unused-imports,
--remove-duplicate-keys,
--remove-unused-variables,
]