File tree Expand file tree Collapse file tree 4 files changed +26
-7
lines changed Expand file tree Collapse file tree 4 files changed +26
-7
lines changed Original file line number Diff line number Diff line change @@ -148,7 +148,7 @@ extend-exclude = [
148
148
]
149
149
150
150
[tool .mypy ]
151
- python_version = " 3.8 "
151
+ python_version = " 3.10 "
152
152
ignore_missing_imports = true
153
153
namespace_packages = false
154
154
@@ -157,6 +157,24 @@ warn_redundant_casts = true
157
157
warn_unused_ignores = true
158
158
159
159
160
+ check_untyped_defs = true
161
+
162
+ [[tool .mypy .overrides ]]
163
+ module = [
164
+ " zarr._storage.store" ,
165
+ " zarr._storage.v3_storage_transformers" ,
166
+ " zarr.v3.group" ,
167
+ " zarr.core" ,
168
+ " zarr.hierarchy" ,
169
+ " zarr.indexing" ,
170
+ " zarr.storage" ,
171
+ " zarr.sync" ,
172
+ " zarr.util" ,
173
+ " tests.*" ,
174
+ ]
175
+ check_untyped_defs = false
176
+
177
+
160
178
[tool .pytest .ini_options ]
161
179
doctest_optionflags = [
162
180
" NORMALIZE_WHITESPACE" ,
Original file line number Diff line number Diff line change
1
+ from typing import Any
1
2
import warnings
2
3
from collections .abc import MutableMapping
3
4
@@ -39,7 +40,7 @@ def _get_nosync(self):
39
40
try :
40
41
data = self .store [self .key ]
41
42
except KeyError :
42
- d = dict ()
43
+ d : dict [ str , Any ] = dict ()
43
44
if self ._version > 2 :
44
45
d ["attributes" ] = {}
45
46
else :
Original file line number Diff line number Diff line change @@ -325,10 +325,9 @@ class N5FSStore(FSStore):
325
325
326
326
def __init__ (self , * args , ** kwargs ):
327
327
if "dimension_separator" in kwargs :
328
- kwargs .pop ("dimension_separator" )
329
328
warnings .warn ("Keyword argument `dimension_separator` will be ignored" )
330
- dimension_separator = "."
331
- super ().__init__ (* args , dimension_separator = dimension_separator , ** kwargs )
329
+ kwargs [ " dimension_separator" ] = "."
330
+ super ().__init__ (* args , ** kwargs )
332
331
333
332
@staticmethod
334
333
def _swap_separator (key : str ):
Original file line number Diff line number Diff line change @@ -90,8 +90,9 @@ def _get_loop():
90
90
# repeat the check just in case the loop got filled between the
91
91
# previous two calls from another thread
92
92
if loop [0 ] is None :
93
- loop [0 ] = asyncio .new_event_loop ()
94
- th = threading .Thread (target = loop [0 ].run_forever , name = "zarrIO" )
93
+ new_loop = asyncio .new_event_loop ()
94
+ loop [0 ] = new_loop
95
+ th = threading .Thread (target = new_loop .run_forever , name = "zarrIO" )
95
96
th .daemon = True
96
97
th .start ()
97
98
iothread [0 ] = th
You can’t perform that action at this time.
0 commit comments