-
Notifications
You must be signed in to change notification settings - Fork 12
/
.pre-commit-config.yaml
83 lines (80 loc) · 1.94 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
default_language_version:
python: python3.8
repos:
- repo: https://github.com/psf/black
rev: 20.8b1
hooks:
- id: black
additional_dependencies: ["click==8.0.4"]
- repo: https://github.com/pre-commit/mirrors-isort
rev: v5.4.2
hooks:
- id: isort
args: ["--profile", "black"]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.812
hooks:
- id: mypy
name: mypy-fv3core
args: [--config-file, setup.cfg]
files: fv3core
exclude: |
(?x)^(
fv3core/pace/fv3core/stencils/fv_subgridz.py |
fv3core/tests/conftest.py
)$
- id: mypy
name: mypy-util
args: [--config-file, setup.cfg]
files: ^util
- id: mypy
name: mypy-stencils
args: [--config-file, setup.cfg]
files: stencils
exclude: |
(?x)^(
stencils/pace/stencils/testing/grid.py |
)$
- id: mypy
name: mypy-driver
args: [--config-file, setup.cfg]
files: driver
exclude: |
(?x)^(
tests/main/driver/__init__.py |
)$
- id: mypy
name: mypy-physics
args: [--config-file, setup.cfg]
files: physics
- id: mypy
name: mypy-dsl
args: [--config-file, setup.cfg]
files: dsl
exclude: |
(?x)^(
dsl/pace/dsl/gt4py_utils.py |
)$
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: check-toml
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/pycqa/flake8
rev: 3.9.2
hooks:
- id: flake8
name: flake8
language_version: python3
args: [--config, setup.cfg]
exclude: |
(?x)^(
.*/__init__.py |
)$
- id: flake8
name: flake8 __init__.py files
files: "__init__.py"
# ignore unused import error in __init__.py files
args: ["--ignore=F401,E203", --config, setup.cfg]