From 9663e542f1f1b9898aeccc8f9c8c58e927032b82 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Fri, 12 Mar 2021 16:16:31 +0100 Subject: [PATCH] Improved spinner --- src/cpl/console/console.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/cpl/console/console.py b/src/cpl/console/console.py index 271f3af2..ee429d82 100644 --- a/src/cpl/console/console.py +++ b/src/cpl/console/console.py @@ -252,7 +252,10 @@ class Console: cls._output(string, x, y, end='') @classmethod - def spinner(cls, message: str, call: Callable, *args, text_foreground_color: ForegroundColorEnum = None, spinner_foreground_color: ForegroundColorEnum = None, text_background_color: BackgroundColorEnum = None, spinner_background_color: BackgroundColorEnum = None) -> any: + def spinner(cls, message: str, call: Callable, *args, text_foreground_color: Union[str, ForegroundColorEnum] = None, + spinner_foreground_color: Union[str, ForegroundColorEnum] = None, + text_background_color: Union[str, BackgroundColorEnum] = None, + spinner_background_color: Union[str, BackgroundColorEnum] = None) -> any: if cls._hold_back: cls._hold_back_calls.append(ConsoleCall(cls.spinner, message, call, *args)) return