diff --git a/piker/data/validate.py b/piker/data/validate.py index a446984f..f460bd71 100644 --- a/piker/data/validate.py +++ b/piker/data/validate.py @@ -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 diff --git a/piker/service/marketstore.py b/piker/service/marketstore.py index cf4d523a..2e2382dc 100644 --- a/piker/service/marketstore.py +++ b/piker/service/marketstore.py @@ -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]) diff --git a/piker/storage/__init__.py b/piker/storage/__init__.py index b7e55040..46e18626 100644 --- a/piker/storage/__init__.py +++ b/piker/storage/__init__.py @@ -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,