-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
56 lines (51 loc) · 1.66 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
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
# Git
- id: check-added-large-files
- id: no-commit-to-branch
name: "ensure no direct commit to main/vXX branch"
args: [--branch, "main", --pattern, "v\\d+"]
- id: check-case-conflict
# Contents
- id: mixed-line-ending
- id: fix-byte-order-marker
- id: check-yaml
- repo: https://github.com/pre-commit/mirrors-autopep8
rev: v1.5.5
hooks:
- id: autopep8
additional_dependencies: [pycodestyle==2.6.0]
- repo: https://github.com/PyCQA/flake8
rev: 3.8.4
hooks:
- id: flake8
# use config from setup.cfg
- id: flake8
name: flake8 (cython)
types: ["cython"]
args: [--config, ".flake8.cython"]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.950
hooks:
- id: mypy
# Keep in sync with the list in setup.cfg
files: "^(cupy|cupyx|cupy_backends|.github|.pfnci)/"
additional_dependencies: [numpy, types-setuptools==57.4.14, types-PyYAML]
- id: mypy
name: "mypy (install)"
files: "^install/"
args: [--config-file, "install/mypy.ini"]
additional_dependencies: [numpy, types-setuptools==57.4.14, types-PyYAML]
- repo: local
hooks:
- id: ci-generate
name: "check CI files are up-to-date (.pfnci/generate.py)"
files: .pfnci/
entry: .pfnci/generate.py --dry-run
pass_filenames: false
language: python
additional_dependencies: [PyYAML]