Skip to content

Commit ab4e94e

Browse files
authored
Move mypy configs from pre-commit to mypy config (#5110)
* Move mypy configs from pre-commit to mypy config * _ * _ * _ * Added GH link
1 parent 80e8995 commit ab4e94e

File tree

4 files changed

+5
-2
lines changed

4 files changed

+5
-2
lines changed

.github/workflows/ci-additional.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ jobs:
181181
python xarray/util/print_versions.py
182182
- name: Run mypy
183183
run: |
184-
python -m mypy xarray
184+
python -m mypy .
185185
186186
min-version-policy:
187187
name: Minimum Version Policy

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ repos:
3434
rev: v0.812
3535
hooks:
3636
- id: mypy
37+
# Copied from setup.cfg
3738
exclude: "properties|asv_bench"
3839
# run this occasionally, ref discussion https://github.com/pydata/xarray/pull/3194
3940
# - repo: https://github.com/asottile/pyupgrade

ci/requirements/mypy_only

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
# used for the "Type checking (mypy)" CI run
22
# version must correspond to the one in .pre-commit-config.yaml
3+
# See https://github.com/pydata/xarray/issues/4881 for more details.
34
mypy=0.812

setup.cfg

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,8 @@ default_section = THIRDPARTY
162162
known_first_party = xarray
163163

164164
[mypy]
165+
exclude = properties|asv_bench|doc
166+
files = xarray/**/*.py
165167
show_error_codes = True
166168

167169
# Most of the numerical computing stack doesn't have type annotations yet.
@@ -238,7 +240,6 @@ ignore_missing_imports = True
238240
[mypy-xarray.core.pycompat]
239241
ignore_errors = True
240242

241-
242243
[aliases]
243244
test = pytest
244245

0 commit comments

Comments
 (0)