generated from victoresque/pytorch-template
-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy path.pre-commit-config.yaml
49 lines (42 loc) · 1.24 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
# Pre-commit hooks
default_language_version:
python: python3.10
# Define bot property if installed via https://github.com/marketplace/pre-commit-ci
# ci:
# autofix_prs: true
# autofix_commit_msg: '🎨 [pre-commit.ci] auto fixes from pre-commit hooks'
# autoupdate_commit_msg: '⬆️ [pre-commit.ci] pre-commit autoupdate'
# autoupdate_schedule: monthly
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-case-conflict
- id: check-json
- id: check-yaml
- id: check-docstring-first
- id: trailing-whitespace
- id: pretty-format-json
args: [--autofix, --indent=4, --no-ensure-ascii, --no-sort-keys]
- repo: https://github.com/asottile/pyupgrade
rev: v3.8.0
hooks:
- id: pyupgrade
name: Upgrade code
args: [ --py37-plus ]
- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
- id: black
name: PEP8 formatting
args: [ --skip-string-normalization, --line-length=100]
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
name: I-sort imports
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
hooks:
- id: flake8
name: PEP8 checker