Group shared `reg_err_types` imports with Tractor deps
Finish the shared-module portion of the import cleanup whose Kraken hunks landed inwkt/land_kraken_parity_replaye0f8e5a8. Deats, - Group the validation, MarketStore and storage imports with the other third-party deps. Keep exception registration beside the classes it registers. - Use absolute `piker` imports in `storage.__init__`. Extracted fromf210a478c6. (this commit msg was generated in some part by `Codex` using `GPT-6` (`OpenAI`))
parent
3889ab4db1
commit
30a4fb13df
|
|
@ -28,13 +28,13 @@ from typing import (
|
|||
)
|
||||
|
||||
from msgspec import field
|
||||
from tractor._exceptions import reg_err_types
|
||||
|
||||
from piker.types import Struct
|
||||
from piker.accounting import (
|
||||
Asset,
|
||||
MktPair,
|
||||
)
|
||||
from tractor._exceptions import reg_err_types
|
||||
from ._util import log
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ from msgspec.msgpack import (
|
|||
# import pyqtgraph as pg
|
||||
import numpy as np
|
||||
import tractor
|
||||
from tractor._exceptions import reg_err_types
|
||||
from trio_websocket import open_websocket_url
|
||||
from anyio_marketstore import ( # noqa
|
||||
open_marketstore_client,
|
||||
|
|
@ -382,7 +383,6 @@ def quote_to_marketstore_structarray(
|
|||
class MarketStoreError(Exception):
|
||||
"Generic marketstore client error"
|
||||
|
||||
from tractor._exceptions import reg_err_types
|
||||
reg_err_types([MarketStoreError])
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -42,15 +42,17 @@ from typing import (
|
|||
)
|
||||
|
||||
import numpy as np
|
||||
from tractor._exceptions import reg_err_types
|
||||
|
||||
from .. import config
|
||||
from ..service import (
|
||||
check_for_service,
|
||||
)
|
||||
from ..log import (
|
||||
from piker import config
|
||||
from piker.log import (
|
||||
get_logger,
|
||||
get_console_log,
|
||||
)
|
||||
from piker.service import (
|
||||
check_for_service,
|
||||
)
|
||||
|
||||
subsys: str = 'piker.storage'
|
||||
|
||||
log = get_logger(subsys)
|
||||
|
|
@ -160,7 +162,6 @@ class StorageConnectionError(ConnectionError):
|
|||
|
||||
'''
|
||||
|
||||
from tractor._exceptions import reg_err_types
|
||||
reg_err_types([
|
||||
TimeseriesNotFound,
|
||||
StorageConnectionError,
|
||||
|
|
|
|||
Loading…
Reference in New Issue