From fcd1b7876d7fa2742330443aeb1a6627b0a68053 Mon Sep 17 00:00:00 2001 From: Panu Lahtinen Date: Tue, 22 Oct 2024 14:26:19 +0300 Subject: [PATCH] Rename variable dct to datetimes --- trollflow2/cli.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/trollflow2/cli.py b/trollflow2/cli.py index c1d7dc30..aca3bc91 100644 --- a/trollflow2/cli.py +++ b/trollflow2/cli.py @@ -55,12 +55,12 @@ def _read_log_config(args): return log_config -def datetime_decoder(dct): +def datetime_decoder(datetimes): """Decode datetimes to python objects.""" - if isinstance(dct, list): - pairs = enumerate(dct) - elif isinstance(dct, dict): - pairs = dct.items() + if isinstance(datetimes, list): + pairs = enumerate(datetimes) + elif isinstance(datetimes, dict): + pairs = datetimes.items() result = [] for key, val in pairs: if isinstance(val, str): @@ -71,7 +71,7 @@ def datetime_decoder(dct): elif isinstance(val, (dict, list)): val = datetime_decoder(val) result.append((key, val)) - if isinstance(dct, list): + if isinstance(datetimes, list): return [x[1] for x in result] - elif isinstance(dct, dict): + elif isinstance(datetimes, dict): return dict(result)