-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
60 lines (53 loc) · 1.78 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
repos:
- repo: https://github.com/psf/black
rev: 23.9.1
hooks:
- id: black
description: code formatter
args: []
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
description: sort your imports
args: ["--profile", "black"]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-merge-conflict
description: Check for files that contain merge conflict strings.
language_version: python3
- id: trailing-whitespace
description: Trims trailing whitespace.
args: [--markdown-linebreak-ext=md]
language_version: python3
- id: mixed-line-ending
description: Replaces or checks mixed line ending.
args: [--fix=lf]
language_version: python3
- id: end-of-file-fixer
description: Makes sure files end in a newline and only a newline.
language_version: python3
- id: check-ast
description: Simply check whether files parse as valid python.
language_version: python3
- id: check-json
# ----- Formatting ---------------------------------------------------------------------------->
- repo: https://github.com/myint/autoflake
rev: v2.2.1
hooks:
- id: autoflake
name: Remove unused variables and imports
language: python
args: ["--in-place", "--remove-all-unused-imports", "--remove-unused-variables", "--expand-star-imports"]
files: \.py$
- repo: https://github.com/saltstack/pre-commit-remove-import-headers
rev: 1.1.0
hooks:
- id: remove-import-headers
- repo: https://github.com/asottile/pyupgrade
rev: v3.15.0
hooks:
- id: pyupgrade
name: Rewrite Code to be Py3.8+
args: [--py38-plus]