Skip to content

Commit 3112d77

Browse files
authored
[Improvement] Update pre-commit (PaddlePaddle#1890)
1 parent 0b21e9f commit 3112d77

File tree

2 files changed

+17
-33
lines changed

2 files changed

+17
-33
lines changed

.pre-commit-config.yaml

+17-30
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,28 @@
1-
- repo: local
1+
repos:
2+
- repo: https://github.com/PaddlePaddle/mirrors-yapf.git
3+
sha: 0d79c0c469bab64f7229c9aca2b1186ef47f0e37
24
hooks:
35
- id: yapf
4-
name: yapf
5-
entry: yapf
6-
language: system
7-
args: [-i, --style .style.yapf]
86
files: \.py$
9-
107
- repo: https://github.com/pre-commit/pre-commit-hooks
118
sha: a11d9314b22d8f8c7556443875b731ef05965464
129
hooks:
1310
- id: check-merge-conflict
1411
- id: check-symlinks
12+
- id: detect-private-key
13+
files: (?!.*paddle)^.*$
1514
- id: end-of-file-fixer
15+
files: \.md$
1616
- id: trailing-whitespace
17-
- id: detect-private-key
18-
- id: check-symlinks
19-
- id: check-added-large-files
20-
21-
- repo: local
22-
hooks:
23-
- id: flake8
24-
name: flake8
25-
entry: flake8
26-
language: system
27-
args:
28-
- --count
29-
- --select=E9,F63,F7,F82
30-
- --show-source
31-
- --statistics
32-
files: \.py$
33-
34-
- repo: local
17+
files: \.md$
18+
- repo: https://github.com/Lucas-C/pre-commit-hooks
19+
sha: v1.0.1
3520
hooks:
36-
- id: copyright_checker
37-
name: copyright_checker
38-
entry: python ./.copyright.hook
39-
language: system
40-
files: \.(c|cc|cxx|cpp|cu|h|hpp|hxx|proto|py)$
41-
exclude: (?!.*third_party)^.*$
21+
- id: forbid-crlf
22+
files: \.md$
23+
- id: remove-crlf
24+
files: \.md$
25+
- id: forbid-tabs
26+
files: \.md$
27+
- id: remove-tabs
28+
files: \.md$

requirements.txt

-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
pre-commit
2-
yapf == 0.26.0
3-
flake8
41
pyyaml >= 5.1
52
visualdl >= 2.0.0
63
opencv-python

0 commit comments

Comments
 (0)