From 5fe0b84f938368f0374d3cc4b28fcc845c07367c Mon Sep 17 00:00:00 2001 From: Chandler May Date: Mon, 16 Dec 2024 14:18:27 -0500 Subject: [PATCH] Fix Task.worker_timeout type annotation. --- luigi/task.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/luigi/task.py b/luigi/task.py index 3482f1bf26..a00acda719 100644 --- a/luigi/task.py +++ b/luigi/task.py @@ -29,7 +29,7 @@ import re import copy import functools -from typing import Any, Dict +from typing import Any, Dict, Optional import luigi @@ -186,7 +186,7 @@ class MyTask(luigi.Task): #: Number of seconds after which to time out the run function. #: No timeout if set to 0. #: Defaults to 0 or worker-timeout value in config - worker_timeout = None + worker_timeout: Optional[int] = None #: Maximum number of tasks to run together as a batch. Infinite by default max_batch_size = float('inf')