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, open_feed,
) )
from .flows import Flume from .flows import Flume
from ._symcache import (
SymbologyCache,
open_symcache,
get_symcache,
)
from .types import Struct
__all__ = [ __all__: list[str] = [
'Flume', 'Flume',
'Feed', 'Feed',
'open_feed', 'open_feed',
@ -53,4 +59,8 @@ __all__ = [
'get_shm_token', 'get_shm_token',
'def_iohlcv_fields', 'def_iohlcv_fields',
'def_ohlcv_fields', 'def_ohlcv_fields',
'open_symcache',
'get_symcache',
'SymbologyCache',
'Struct',
] ]

View File

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

View File

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