Use `import <name> as <name>,` in `.tsp`

Thanks to oremanj in the `trio` room for this hot style tip which i much
prefer to have less LOC and places to change sub-pkg name exports!

Also drop expecting a `gaps` frame output from `dedupe()`.
distribute_dis
Tyler Goodlet 2023-12-28 10:58:22 -05:00
parent 5702e422d8
commit 59536bd284
1 changed files with 15 additions and 38 deletions

View File

@ -67,50 +67,28 @@ from ..data._sampling import (
)
from ._anal import (
get_null_segs,
iter_null_segs,
Frame,
Seq,
get_null_segs as get_null_segs,
iter_null_segs as iter_null_segs,
Frame as Frame,
Seq as Seq,
# codec-ish
np2pl,
pl2np,
np2pl as np2pl,
pl2np as pl2np,
# `numpy` only
slice_from_time,
slice_from_time as slice_from_time,
# `polars` specific
dedupe,
with_dts,
detect_time_gaps,
sort_diff,
dedupe as dedupe,
with_dts as with_dts,
detect_time_gaps as detect_time_gaps,
sort_diff as sort_diff,
# TODO:
detect_price_gaps
detect_price_gaps as detect_price_gaps
)
__all__: list[str] = [
'dedupe',
'get_null_segs',
'iter_null_segs',
'sort_diff',
'slice_from_time',
'Frame',
'Seq',
'np2pl',
'pl2np',
'slice_from_time',
'with_dts',
'detect_time_gaps',
'sort_diff',
# TODO:
'detect_price_gaps'
]
# TODO: break up all this shite into submods!
from ..brokers._util import (
DataUnavailable,
@ -589,13 +567,12 @@ async def start_backfill(
load_from_offline=False,
)
(
df,
gaps,
wdts,
deduped,
diff,
) = dedupe(df)
if diff:
sort_diff(df)
# if diff:
# sort_diff(df)
else:
# finally filled gap