X-Git-Url: https://wannabe.guru.org/gitweb/?a=blobdiff_plain;f=thread_utils.py;h=22161275605d76a1199df8f18d536fd04e2fe17b;hb=a4bf4d05230474ad14243d67ac7f8c938f670e58;hp=51078a4e57ebe9193a3eee4669a1cf33a55bb4e0;hpb=b3ef553f4f30614b97e23f2d4ad6d6576ec57adf;p=python_utils.git diff --git a/thread_utils.py b/thread_utils.py index 51078a4..2216127 100644 --- a/thread_utils.py +++ b/thread_utils.py @@ -61,7 +61,7 @@ def is_current_thread_main_thread() -> bool: def background_thread( _funct: Optional[Callable], -) -> Tuple[threading.Thread, threading.Event]: +) -> Callable[..., Tuple[threading.Thread, threading.Event]]: """A function decorator to create a background thread. *** Please note: the decorated function must take an shutdown *** @@ -110,7 +110,7 @@ def background_thread( return inner_wrapper if _funct is None: - return wrapper + return wrapper # type: ignore else: return wrapper(_funct)