File tree 2 files changed +5
-5
lines changed 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ def parse_zarr_format(data: Any) -> ZarrFormat:
51
51
def parse_attributes (data : Any ) -> dict [str , Any ]:
52
52
if data is None :
53
53
return {}
54
- elif isinstance (data , dict ) and all (isinstance (v , str ) for v in data . keys () ):
54
+ elif isinstance (data , dict ) and all (isinstance (k , str ) for k in data ):
55
55
return data
56
56
msg = f"Expected dict with string keys. Got { type (data )} instead."
57
57
raise TypeError (msg )
Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ def fully_qualified_name(cls: type) -> str:
107
107
108
108
109
109
def register_codec (key : str , codec_cls : type [Codec ]) -> None :
110
- if key not in __codec_registries . keys () :
110
+ if key not in __codec_registries :
111
111
__codec_registries [key ] = Registry ()
112
112
__codec_registries [key ].register (codec_cls )
113
113
@@ -158,7 +158,7 @@ def get_pipeline_class(reload_config: bool = False) -> type[CodecPipeline]:
158
158
if pipeline_class :
159
159
return pipeline_class
160
160
raise BadConfigError (
161
- f"Pipeline class '{ path } ' not found in registered pipelines: { list (__pipeline_registry . keys () )} ."
161
+ f"Pipeline class '{ path } ' not found in registered pipelines: { list (__pipeline_registry )} ."
162
162
)
163
163
164
164
@@ -172,7 +172,7 @@ def get_buffer_class(reload_config: bool = False) -> type[Buffer]:
172
172
if buffer_class :
173
173
return buffer_class
174
174
raise BadConfigError (
175
- f"Buffer class '{ path } ' not found in registered buffers: { list (__buffer_registry . keys () )} ."
175
+ f"Buffer class '{ path } ' not found in registered buffers: { list (__buffer_registry )} ."
176
176
)
177
177
178
178
@@ -185,7 +185,7 @@ def get_ndbuffer_class(reload_config: bool = False) -> type[NDBuffer]:
185
185
if ndbuffer_class :
186
186
return ndbuffer_class
187
187
raise BadConfigError (
188
- f"NDBuffer class '{ path } ' not found in registered buffers: { list (__ndbuffer_registry . keys () )} ."
188
+ f"NDBuffer class '{ path } ' not found in registered buffers: { list (__ndbuffer_registry )} ."
189
189
)
190
190
191
191
You can’t perform that action at this time.
0 commit comments