🔨 refactor(base.py): remove unnecessary type hinting for task_id parameter in get_task method

🔨 refactor(base.py): remove unnecessary return type hinting for launch_task method
This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-09-05 15:33:11 -03:00
commit 8a47fb75cb

View file

@ -1,14 +1,12 @@
from abc import ABC, abstractmethod from abc import ABC, abstractmethod
from typing import Any, Callable, Union from typing import Any, Callable
class TaskBackend(ABC): class TaskBackend(ABC):
@abstractmethod @abstractmethod
def launch_task( def launch_task(self, task_func: Callable[..., Any], *args: Any, **kwargs: Any):
self, task_func: Callable[..., Any], *args: Any, **kwargs: Any
) -> Union[int, str]:
pass pass
@abstractmethod @abstractmethod
def get_task(self, task_id: Union[int, str]) -> Any: def get_task(self, task_id: str) -> Any:
pass pass