This repository has been archived by the owner on Jul 31, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
/
.pre-commit-config.yaml
74 lines (74 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: trailing-whitespace
name: (Common) Remove trailing whitespaces
- id: mixed-line-ending
name: (Common) Fix mixed line ending
args: [--fix=lf]
- id: end-of-file-fixer
name: (Common) Remove extra EOF newlines
- id: check-merge-conflict
name: (Common) Check for merge conflicts
- id: requirements-txt-fixer
name: (Common) Sort "requirements.txt"
- id: fix-encoding-pragma
name: (Python) Remove encoding pragmas
args: [--remove]
- id: double-quote-string-fixer
name: (Python) Fix double-quoted strings
- id: debug-statements
name: (Python) Check for debugger imports
- id: check-json
name: (JSON) Check syntax
- id: check-yaml
name: (YAML) Check syntax
- id: check-toml
name: (TOML) Check syntax
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.7
hooks:
- id: mdformat
name: (Markdown) Format with mdformat
- repo: https://github.com/asottile/pyupgrade
rev: v2.19.4
hooks:
- id: pyupgrade
name: (Python) Update syntax for newer versions
args: [--py36-plus]
- repo: https://github.com/google/yapf
rev: v0.31.0
hooks:
- id: yapf
name: (Python) Format with yapf
- repo: https://github.com/pycqa/isort
rev: 5.8.0
hooks:
- id: isort
name: (Python) Sort imports with isort (torchpack)
exclude: examples/
- id: isort
name: (Python) Sort imports with isort (examples)
files: ^examples/
args: [--sp, examples/setup.cfg]
- repo: https://github.com/pycqa/flake8
rev: 3.9.2
hooks:
- id: flake8
name: (Python) Check with flake8
additional_dependencies:
- flake8-bugbear
- flake8-comprehensions
- flake8-docstrings
- flake8-executable
- flake8-quotes
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.902
hooks:
- id: mypy
name: (Python) Check with mypy
additional_dependencies:
- tokenize-rt
- types-pyyaml
- types-toml