diff --git a/freqtrade/util/rich_progress.py b/freqtrade/util/rich_progress.py index f4f993f7e..b7d8f4c3d 100644 --- a/freqtrade/util/rich_progress.py +++ b/freqtrade/util/rich_progress.py @@ -1,13 +1,20 @@ -from typing import Callable, List, Union +from typing import Callable, List, Optional, Union from rich.console import ConsoleRenderable, Group, RichCast from rich.progress import Progress class CustomProgress(Progress): - def __init__(self, *args, cust_objs=[], cust_callables: List[Callable] = [], **kwargs) -> None: - self._cust_objs = cust_objs - self._cust_callables = cust_callables + def __init__( + self, + *args, + cust_objs: Optional[List[ConsoleRenderable]] = None, + cust_callables: Optional[List[Callable[[], ConsoleRenderable]]] = None, + **kwargs, + ) -> None: + self._cust_objs = cust_objs or [] + self._cust_callables = cust_callables or [] + super().__init__(*args, **kwargs) def get_renderable(self) -> Union[ConsoleRenderable, RichCast, str]: