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 msgspec import field
|
||||||
|
from tractor._exceptions import reg_err_types
|
||||||
|
|
||||||
from piker.types import Struct
|
from piker.types import Struct
|
||||||
from piker.accounting import (
|
from piker.accounting import (
|
||||||
Asset,
|
Asset,
|
||||||
MktPair,
|
MktPair,
|
||||||
)
|
)
|
||||||
from tractor._exceptions import reg_err_types
|
|
||||||
from ._util import log
|
from ._util import log
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,7 @@ from msgspec.msgpack import (
|
||||||
# import pyqtgraph as pg
|
# import pyqtgraph as pg
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import tractor
|
import tractor
|
||||||
|
from tractor._exceptions import reg_err_types
|
||||||
from trio_websocket import open_websocket_url
|
from trio_websocket import open_websocket_url
|
||||||
from anyio_marketstore import ( # noqa
|
from anyio_marketstore import ( # noqa
|
||||||
open_marketstore_client,
|
open_marketstore_client,
|
||||||
|
|
@ -382,7 +383,6 @@ def quote_to_marketstore_structarray(
|
||||||
class MarketStoreError(Exception):
|
class MarketStoreError(Exception):
|
||||||
"Generic marketstore client error"
|
"Generic marketstore client error"
|
||||||
|
|
||||||
from tractor._exceptions import reg_err_types
|
|
||||||
reg_err_types([MarketStoreError])
|
reg_err_types([MarketStoreError])
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -42,15 +42,17 @@ from typing import (
|
||||||
)
|
)
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
from tractor._exceptions import reg_err_types
|
||||||
|
|
||||||
from .. import config
|
from piker import config
|
||||||
from ..service import (
|
from piker.log import (
|
||||||
check_for_service,
|
|
||||||
)
|
|
||||||
from ..log import (
|
|
||||||
get_logger,
|
get_logger,
|
||||||
get_console_log,
|
get_console_log,
|
||||||
)
|
)
|
||||||
|
from piker.service import (
|
||||||
|
check_for_service,
|
||||||
|
)
|
||||||
|
|
||||||
subsys: str = 'piker.storage'
|
subsys: str = 'piker.storage'
|
||||||
|
|
||||||
log = get_logger(subsys)
|
log = get_logger(subsys)
|
||||||
|
|
@ -160,7 +162,6 @@ class StorageConnectionError(ConnectionError):
|
||||||
|
|
||||||
'''
|
'''
|
||||||
|
|
||||||
from tractor._exceptions import reg_err_types
|
|
||||||
reg_err_types([
|
reg_err_types([
|
||||||
TimeseriesNotFound,
|
TimeseriesNotFound,
|
||||||
StorageConnectionError,
|
StorageConnectionError,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue