@@ -33,6 +33,7 @@ accel = ["scipy", "bottleneck", "numbagg", "flox", "opt_einsum"]
33
33
complete = [" xarray[accel,io,parallel,viz,dev]" ]
34
34
dev = [
35
35
" hypothesis" ,
36
+ " mypy" ,
36
37
" pre-commit" ,
37
38
" pytest" ,
38
39
" pytest-cov" ,
@@ -86,8 +87,8 @@ exclude_lines = ["pragma: no cover", "if TYPE_CHECKING"]
86
87
[tool .mypy ]
87
88
enable_error_code = " redundant-self"
88
89
exclude = [
89
- ' xarray/util/generate_.*\.py' ,
90
- ' xarray/datatree_/.*\.py' ,
90
+ ' xarray/util/generate_.*\.py' ,
91
+ ' xarray/datatree_/.*\.py' ,
91
92
]
92
93
files = " xarray"
93
94
show_error_codes = true
@@ -98,8 +99,8 @@ warn_unused_ignores = true
98
99
99
100
# Ignore mypy errors for modules imported from datatree_.
100
101
[[tool .mypy .overrides ]]
101
- module = " xarray.datatree_.*"
102
102
ignore_errors = true
103
+ module = " xarray.datatree_.*"
103
104
104
105
# Much of the numerical computing stack doesn't have type annotations yet.
105
106
[[tool .mypy .overrides ]]
@@ -255,6 +256,9 @@ target-version = "py39"
255
256
# E402: module level import not at top of file
256
257
# E501: line too long - let black worry about that
257
258
# E731: do not assign a lambda expression, use a def
259
+ extend-safe-fixes = [
260
+ " TID252" , # absolute imports
261
+ ]
258
262
ignore = [
259
263
" E402" ,
260
264
" E501" ,
@@ -268,9 +272,6 @@ select = [
268
272
" I" , # isort
269
273
" UP" , # Pyupgrade
270
274
]
271
- extend-safe-fixes = [
272
- " TID252" , # absolute imports
273
- ]
274
275
275
276
[tool .ruff .lint .per-file-ignores ]
276
277
# don't enforce absolute imports
0 commit comments