This repository has been archived by the owner on Dec 22, 2022. It is now read-only.
forked from GridTools/gt4py
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.pre-commit-config.yaml
158 lines (148 loc) · 4.53 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
default_language_version:
python: python3.8
repos:
# - repo: meta
# hooks:
# - id: check-hooks-apply
# - id: check-useless-excludes
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
hooks:
- id: check-case-conflict
# - id: check-json
- id: check-merge-conflict
exclude_types: [rst]
- id: check-toml
- id: check-yaml
- id: debug-statements
# - id: fix-encoding-pragma
# args: [--remove]
# - id: pretty-format-json
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.2.0
hooks:
- id: pretty-format-ini
args: [--autofix]
- id: pretty-format-toml
args: [--autofix]
- id: pretty-format-yaml
args: [--autofix, --preserve-quotes, --indent, '2']
# - repo: https://github.com/Lucas-C/pre-commit-hooks
# rev: v1.1.9
# hooks:
# - id: insert-license
# name: Add license for all GT4Py Python source files
# exclude: (^\..*$)|(^.*/gtc(_.*)?/.*$)|(^.*/eve(_.*)?/.*$)
# types: [python]
# args: [--comment-style, "|#|", --license-filepath, .license_headers/gt4py_license_header.txt, --fuzzy-match-generates-todo]
# - repo: https://github.com/Lucas-C/pre-commit-hooks
# rev: v1.1.9
# hooks:
# - id: insert-license
# name: Add license for all GTC Python source files
# exclude: ^\..*$
# files: ^.*/gtc(_.*)?/.*$
# types: [python]
# args: [--comment-style, "|#|", --license-filepath, .license_headers/gtc_license_header.txt, --fuzzy-match-generates-todo]
# - repo: https://github.com/Lucas-C/pre-commit-hooks
# rev: v1.1.9
# hooks:
# - id: insert-license
# name: Add license for all Eve Python source files
# exclude: ^\..*$
# files: ^.*/eve(_.*)?/.*$
# types: [python]
# args: [--comment-style, "|#|", --license-filepath, .license_headers/eve_license_header.txt, --fuzzy-match-generates-todo]
# - repo: https://github.com/asottile/yesqa
# rev: v1.2.2
# hooks:
# - id: yesqa
# additional_dependencies:
# - flake8==3.8.4
# - darglint
# - flake8-bugbear
# - flake8-builtins
# - flake8-debugger
# - flake8-docstrings
# - flake8-eradicate
# - flake8-mutable
# - flake8-rst-docstrings
# - pygments
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: black
- repo: https://github.com/pre-commit/mirrors-isort
rev: v5.10.1
hooks:
- id: isort
- repo: https://gitlab.com/PyCQA/flake8
rev: 5.0.4
hooks:
- id: flake8
additional_dependencies:
- darglint
- flake8-bugbear
- flake8-builtins
- flake8-debugger
- flake8-docstrings
- flake8-eradicate
- flake8-mutable
# Disabled for now due to random false positives
# - flake8-rst-docstrings
- pygments
exclude: |
(?x)^(
setup.py |
docs/gt4py/conf.py |
docs/eve/conf.py |
docs/gtc/conf.py |
src/gt4py/__gtscript__.py |
src/gt4py/__init__.py |
src/gt4py/gtscript.py |
src/gt4py/backend/__init__.py |
src/gt4py/backend/pyext_builder.py |
src/gt4py/frontend/__init__.py |
src/gt4py/frontend/nodes.py |
src/gt4py/frontend/node_util.py |
src/gt4py/utils/__init__.py |
src/gt4py/utils/base.py |
src/gt4py/utils/attrib.py |
src/gt4py/utils/meta.py |
tests/conftest.py |
tests/test_integration/stencil_definitions.py |
tests/test_integration/test_code_generation.py |
tests/test_integration/test_cpp_regression.py |
tests/test_integration/utils.py |
tests/test_unittest/test_call_interface.py |
tests/test_unittest/test_gtscript_frontend.py |
)$
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.982
hooks:
- id: mypy
exclude: |
(?x)^(
docs/gt4py/conf.py |
docs/gtc/conf.py |
docs/eve/conf.py |
src/gt4py/backend/pyext_builder.py |
src/gt4py/frontend/nodes.py |
src/gt4py/frontend/node_util.py |
src/gt4py/frontend/gtscript_frontend.py |
src/gt4py/frontend/defir_to_gtir.py |
src/gt4py/utils/meta.py |
tests/definitions.py |
tests/definition_setup.py |
tests/eve_tests/definitions.py |
tests/test_integration/stencil_definitions.py |
tests/test_integration/test_code_generation.py |
tests/test_unittest/test_call_interface.py |
tests/test_unittest/test_gtscript_frontend.py |
tests/test_unittest/test_gtc/test_common.py |
tests/test_unittest/test_gtc/test_oir.py |
tests/test_unittest/test_gtc/gtir_utils.py |
tests/test_unittest/test_gtc/test_gtir_to_oir.py |
)$
entry: |
mypy --install-types --non-interactive