diff options
| author | Scott Gasch <[email protected]> | 2022-04-02 10:56:53 -0700 |
|---|---|---|
| committer | Scott Gasch <[email protected]> | 2022-04-02 10:56:53 -0700 |
| commit | 9940cf42dbd246211f34c7d3eecf9fa5be4dd642 (patch) | |
| tree | 1ceb9cccab3153e712a8ccd58637ff4092595ef1 /decorator_utils.py | |
| parent | e5d6a97b519e8d074237e93586ba4f7be21e57ce (diff) | |
Cleanup, try to get rid of linter messages.
Diffstat (limited to 'decorator_utils.py')
| -rw-r--r-- | decorator_utils.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/decorator_utils.py b/decorator_utils.py index 084e260..80aec4a 100644 --- a/decorator_utils.py +++ b/decorator_utils.py @@ -18,7 +18,7 @@ import threading import time import traceback import warnings -from typing import Any, Callable, Optional +from typing import Any, Callable, List, Optional # This module is commonly used by others in here and should avoid # taking any unnecessary dependencies back on them. @@ -510,7 +510,7 @@ def thunkify(func): wait_event = threading.Event() result = [None] - exc = [False, None] + exc: List[Any] = [False, None] def worker_func(): try: @@ -527,6 +527,7 @@ def thunkify(func): def thunk(): wait_event.wait() if exc[0]: + assert exc[1] raise exc[1][0](exc[1][1]) return result[0] @@ -673,7 +674,7 @@ def timeout( def decorate(function): if use_signals: - def handler(signum, frame): + def handler(unused_signum, unused_frame): _raise_exception(timeout_exception, error_message) @functools.wraps(function) |
