More type annotations.
[python_utils.git] / thread_utils.py
index 51078a4e57ebe9193a3eee4669a1cf33a55bb4e0..22161275605d76a1199df8f18d536fd04e2fe17b 100644 (file)
@@ -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)