forked from usuyama/hi-ml
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
57 lines (52 loc) · 2.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
50
51
52
53
54
55
56
57
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
# See https://github.com/pre-commit/pre-commit-hooks/blob/master/.pre-commit-config.yaml for an example with more hooks
ci:
autofix_prs: true
autoupdate_commit_msg: "ENH: Autoupdate hooks [pre-commit.ci]"
autoupdate_schedule: monthly
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: check-ast # Simply check whether the files parse as valid python
- id: check-yaml # Attempts to load all yaml files to verify syntax
- id: check-added-large-files # Prevent giant files from being committed
- id: check-docstring-first # Checks a common error of defining a docstring after code
- id: check-merge-conflict # Check for files that contain merge conflict strings
- id: check-vcs-permalinks # Ensures that links to vcs websites are permalinks
- id: detect-private-key # Detects the presence of private keys
- id: end-of-file-fixer # Ensures that a file is either empty, or ends with one newline
- id: trailing-whitespace # This hook trims trailing whitespace
- id: mixed-line-ending # Replaces or checks mixed line ending
- id: check-shebang-scripts-are-executable # Checks that scripts with shebangs are executable
# The structure of this was suggested by the author of pre-commit and maintainer of flake8
# See https://stackoverflow.com/a/66485642/3956024
- repo: https://github.com/PyCQA/flake8
rev: 5.0.2
hooks:
- id: flake8
name: flake8 ./hi-ml/
alias: flake8-hi-ml
files: ^hi-ml/
args: [--config, hi-ml/.flake8]
- id: flake8
name: flake8 ./hi-ml-azure/
alias: flake8-hi-ml-azure
files: ^hi-ml-azure/
args: [--config, hi-ml-azure/.flake8]
- id: flake8
name: flake8 ./hi-ml-cpath/
alias: flake8-hi-ml-cpath
files: ^hi-ml-cpath/
args: [--config, hi-ml-cpath/.flake8]
- id: flake8
name: flake8 ./hi-ml-multimodal/
alias: flake8-hi-ml-multimodal
files: ^hi-ml-multimodal/
args: [--config, hi-ml-multimodal/.flake8]
- repo: https://github.com/pre-commit/mirrors-autopep8
rev: v1.6.0
hooks:
- id: autopep8
args: [--in-place, --max-line-length, "120"]