File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -295,8 +295,6 @@ async def get(
295295 byte_range : ByteRequest | None = None ,
296296 ) -> Buffer | None :
297297 # docstring inherited
298- import obstore as obs
299-
300298 if key .endswith ("zarr.json" ):
301299 return get_zarr_metadata (self ._group , key )
302300 var = key .split ("/" )[0 ]
@@ -309,19 +307,19 @@ async def get(
309307 path = manifest ._paths [* chunk_indexes ]
310308 offset = manifest ._offsets [* chunk_indexes ]
311309 length = manifest ._lengths [* chunk_indexes ]
312- # Get the configured object store instance that matches the path
313- store = self ._store_registry .get_store (path )
310+
314311 # Truncate path to match Obstore expectations
315312 key = urlparse (path ).path
316313 # Transform the input byte range to account for the chunk location in the file
317314 chunk_end_exclusive = offset + length
318315 byte_range = _transform_byte_range (
319316 byte_range , chunk_start = offset , chunk_end_exclusive = chunk_end_exclusive
320317 )
318+ # Get the configured object store instance that matches the path
319+ store = self ._store_registry .get_store (path )
321320 # Actually get the bytes
322321 try :
323- bytes = await obs .get_range_async (
324- store ,
322+ bytes = await store .get_range_async (
325323 key ,
326324 start = byte_range .start ,
327325 end = byte_range .end ,
You can’t perform that action at this time.
0 commit comments