forked from aliyun/pai-python-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
60 lines (52 loc) · 1.28 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
# Install pre-commit hooks via `pip install pre-commit && pre-commit install`
exclude: ^pai/libs
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
exclude: pai/libs
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 22.8.0
hooks:
- id: black
# Exclude third-party libs.
exclude: ^pai/libs
- id: black-jupyter
exclude: ^pai/libs
- repo: https://github.com/pycqa/flake8
rev: 5.0.4
hooks:
- id: flake8
args:
- --config
- .flake8
- repo: https://github.com/crate-ci/typos
rev: v1.16.1
hooks:
- id: typos
args:
- --config
- typos.toml
- -w
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
name: isort (python)
args: [ "--profile", "black", "--filter-files" ]
# remove useless import using autoflake
- repo: https://github.com/PyCQA/autoflake
rev: v1.5.3
hooks:
- id: autoflake
- repo: https://github.com/kynan/nbstripout
rev: 0.6.1
hooks:
- id: nbstripout
- repo: https://github.com/gitleaks/gitleaks
rev: v8.16.1
hooks:
- id: gitleaks