diff --git a/core/utils/stats_timer.py b/core/utils/stats_timer.py index 3346b31b..1a3a953d 100644 --- a/core/utils/stats_timer.py +++ b/core/utils/stats_timer.py @@ -43,7 +43,8 @@ def __init__(self, time: float, system: str | None = None, version: str | None = self._time = time self._inner_stats: list[Stats] = [] if inner_stats: - self._inner_stats = [Stats(**stats) for stats in inner_stats] if inner_stats[0] is dict else inner_stats + self._inner_stats = ([Stats(**stats) for stats in inner_stats] if isinstance(inner_stats[0], dict) + else inner_stats) self._inner_stats_time_sum = None @property