Expose `.data._symcache` stuff at subpkg toplevel

The list is `open_symcache()`, `get_symcache()`, `SymbologyCache`, and
`Stuct` which seems more or less fine to make part of the public
namespace. Also, make `._timeseries.t_unit` an instance of literal to make
`ruff` happy?
account_tests
Tyler Goodlet 2023-07-17 01:20:52 -04:00
parent e8025d0985
commit 2dab0e2e56
3 changed files with 12 additions and 5 deletions

View File

@ -39,9 +39,15 @@ from .feed import (
open_feed,
)
from .flows import Flume
from ._symcache import (
SymbologyCache,
open_symcache,
get_symcache,
)
from .types import Struct
__all__ = [
__all__: list[str] = [
'Flume',
'Feed',
'open_feed',
@ -53,4 +59,8 @@ __all__ = [
'get_shm_token',
'def_iohlcv_fields',
'def_ohlcv_fields',
'open_symcache',
'get_symcache',
'SymbologyCache',
'Struct',
]

View File

@ -225,7 +225,7 @@ def detect_null_time_gap(
return None
t_unit: Literal[
t_unit: Literal = Literal[
'days',
'hours',
'minutes',

View File

@ -31,7 +31,6 @@ import pendulum
import numpy as np
from ..accounting import MktPair
from ._util import log
from .types import Struct
from ._sharedmem import (
attach_shm_array,
@ -233,5 +232,3 @@ class Flume(Struct):
np.all(np.isin(vlm, -1))
or np.all(np.isnan(vlm))
)