From a504ac6100a577cbda1bedf80d69636603ee287c Mon Sep 17 00:00:00 2001 From: danieleades <33452915+danieleades@users.noreply.github.com> Date: Mon, 18 Jul 2022 22:08:16 +0100 Subject: Improve static typing strictness (#10569) --- sphinx/util/parallel.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sphinx/util/parallel.py') diff --git a/sphinx/util/parallel.py b/sphinx/util/parallel.py index 193d2a80d..e89418ad3 100644 --- a/sphinx/util/parallel.py +++ b/sphinx/util/parallel.py @@ -81,7 +81,9 @@ class ParallelTasks: logging.convert_serializable(collector.logs) pipe.send((failed, collector.logs, ret)) - def add_task(self, task_func: Callable, arg: Any = None, result_func: Callable = None) -> None: # NOQA + def add_task( + self, task_func: Callable, arg: Any = None, result_func: Optional[Callable] = None + ) -> None: tid = self._taskid self._taskid += 1 self._result_funcs[tid] = result_func or (lambda arg, result: None) -- cgit v1.2.1