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 ***
return inner_wrapper
if _funct is None:
- return wrapper
+ return wrapper # type: ignore
else:
return wrapper(_funct)