File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 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:
5151def parse_attributes (data : Any ) -> dict [str , Any ]:
5252 if data is None :
5353 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 ):
5555 return data
5656 msg = f"Expected dict with string keys. Got { type (data )} instead."
5757 raise TypeError (msg )
Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ def fully_qualified_name(cls: type) -> str:
107107
108108
109109def register_codec (key : str , codec_cls : type [Codec ]) -> None :
110- if key not in __codec_registries . keys () :
110+ if key not in __codec_registries :
111111 __codec_registries [key ] = Registry ()
112112 __codec_registries [key ].register (codec_cls )
113113
@@ -158,7 +158,7 @@ def get_pipeline_class(reload_config: bool = False) -> type[CodecPipeline]:
158158 if pipeline_class :
159159 return pipeline_class
160160 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 )} ."
162162 )
163163
164164
@@ -172,7 +172,7 @@ def get_buffer_class(reload_config: bool = False) -> type[Buffer]:
172172 if buffer_class :
173173 return buffer_class
174174 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 )} ."
176176 )
177177
178178
@@ -185,7 +185,7 @@ def get_ndbuffer_class(reload_config: bool = False) -> type[NDBuffer]:
185185 if ndbuffer_class :
186186 return ndbuffer_class
187187 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 )} ."
189189 )
190190
191191
You can’t perform that action at this time.
0 commit comments