`.storage.__init__`: code styling updates

hist_backfill_fixes
Tyler Goodlet 2025-10-09 20:00:05 -04:00
parent 614f1c00c5
commit 44c339779f
1 changed files with 14 additions and 6 deletions

View File

@ -43,7 +43,6 @@ from typing import (
import numpy as np import numpy as np
from .. import config from .. import config
from ..service import ( from ..service import (
check_for_service, check_for_service,
@ -162,7 +161,10 @@ class StorageConnectionError(ConnectionError):
''' '''
def get_storagemod(name: str) -> ModuleType: def get_storagemod(
name: str,
) -> ModuleType:
mod: ModuleType = import_module( mod: ModuleType = import_module(
'.' + name, '.' + name,
'piker.storage', 'piker.storage',
@ -175,9 +177,12 @@ def get_storagemod(name: str) -> ModuleType:
@acm @acm
async def open_storage_client( async def open_storage_client(
backend: str | None = None, backend: str|None = None,
) -> tuple[ModuleType, StorageClient]: ) -> tuple[
ModuleType,
StorageClient,
]:
''' '''
Load the ``StorageClient`` for named backend. Load the ``StorageClient`` for named backend.
@ -277,7 +282,10 @@ async def open_tsdb_client(
from ..data.feed import maybe_open_feed from ..data.feed import maybe_open_feed
async with ( async with (
open_storage_client() as (_, storage), open_storage_client() as (
_,
storage,
),
maybe_open_feed( maybe_open_feed(
[fqme], [fqme],
@ -285,7 +293,7 @@ async def open_tsdb_client(
) as feed, ) as feed,
): ):
profiler(f'opened feed for {fqme}') profiler(f'opened feed for {fqme!r}')
# to_append = feed.hist_shm.array # to_append = feed.hist_shm.array
# to_prepend = None # to_prepend = None