`.storage.__init__`: code styling updates
							parent
							
								
									614f1c00c5
								
							
						
					
					
						commit
						44c339779f
					
				|  | @ -43,7 +43,6 @@ from typing import ( | |||
| 
 | ||||
| import numpy as np | ||||
| 
 | ||||
| 
 | ||||
| from .. import config | ||||
| from ..service import ( | ||||
|     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( | ||||
|         '.' + name, | ||||
|         'piker.storage', | ||||
|  | @ -175,9 +177,12 @@ def get_storagemod(name: str) -> ModuleType: | |||
| 
 | ||||
| @acm | ||||
| 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. | ||||
| 
 | ||||
|  | @ -277,7 +282,10 @@ async def open_tsdb_client( | |||
|     from ..data.feed import maybe_open_feed | ||||
| 
 | ||||
|     async with ( | ||||
|         open_storage_client() as (_, storage), | ||||
|         open_storage_client() as ( | ||||
|             _, | ||||
|             storage, | ||||
|         ), | ||||
| 
 | ||||
|         maybe_open_feed( | ||||
|             [fqme], | ||||
|  | @ -285,7 +293,7 @@ async def open_tsdb_client( | |||
| 
 | ||||
|         ) as feed, | ||||
|     ): | ||||
|         profiler(f'opened feed for {fqme}') | ||||
|         profiler(f'opened feed for {fqme!r}') | ||||
| 
 | ||||
|         # to_append = feed.hist_shm.array | ||||
|         # to_prepend = None | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue