redis_timeseries_manager icon indicating copy to clipboard operation
redis_timeseries_manager copied to clipboard

'timeframe_specs' as str? Looks like it's a dict.

Open tlk3 opened this issue 1 year ago • 2 comments

As far as I can tell, 'timeframe_specs' is used as a dict (including your examples). Is there a time when it's used as a str? Does typing need to be updated?

def _create_rule(self, c1:str, c2:str, line:str, timeframe_name:str, timeframe_specs:str, source_key:str, dest_key:str): # timeframe_specs (str): timeframe specs

_timeframes = { '1m': {'retention_secs': 60*60*24*10}, '1h': {'retention_secs': 60*60*24*90, 'bucket_size_secs': 3600}, '1d': {'retention_secs': 60*60*24*365, 'ignore_rules': True}, }

tlk3 avatar Aug 21 '23 15:08 tlk3

Ugh what's up with missing newlines.

tlk3 avatar Aug 21 '23 15:08 tlk3

Yes, it's a wrong type hint in function definition. It has to be as dict

ahmadazizi avatar Aug 21 '23 17:08 ahmadazizi