A bit of a tidy up while reading through the codebase.
More significant changes not pursued:
folding BaseListener into StreamListener as the later is the only instance of the former so avoids unnecessary lasagne
looking into reducing StreamListener(...).register_stream(..., SubscriptionEnum) into something like StreamListener.for_order(...)/StreamListener.for_market(...)/StreamListener.for_race(...) etc. so that the typing is clearer - would be a major change and most of the pay-off you can get from something like listener: StreamListener[OrderBookCache] = StreamListener(...)
looking into factoring out the active parameter of MarketBookCache.update_cache() as it appears unused and is inconsistent with update_cache(...) on the 2 other *Cache classes
A bit of a tidy up while reading through the codebase.
More significant changes not pursued:
BaseListener
intoStreamListener
as the later is the only instance of the former so avoids unnecessary lasagneStreamListener(...).register_stream(..., SubscriptionEnum)
into something likeStreamListener.for_order(...)
/StreamListener.for_market(...)
/StreamListener.for_race(...)
etc. so that the typing is clearer - would be a major change and most of the pay-off you can get from something likelistener: StreamListener[OrderBookCache] = StreamListener(...)
active
parameter ofMarketBookCache.update_cache()
as it appears unused and is inconsistent withupdate_cache(...)
on the 2 other*Cache
classes