From 2a00378966d8db34a0d4d8a499196b54ed3e2120 Mon Sep 17 00:00:00 2001 From: gofrendi Date: Sat, 30 Nov 2024 11:42:29 +0700 Subject: [PATCH] Update base_task --- src/zrb/task/base_task.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/zrb/task/base_task.py b/src/zrb/task/base_task.py index 8ea632ad..7999c4cc 100644 --- a/src/zrb/task/base_task.py +++ b/src/zrb/task/base_task.py @@ -1,7 +1,7 @@ import asyncio import os from collections.abc import Callable -from typing import Any +from typing import Any, Self from zrb.attr.type import BoolAttr, fstring from zrb.context.any_context import AnyContext @@ -75,7 +75,7 @@ def __rshift__(self, other: AnyTask | list[AnyTask]) -> AnyTask: except Exception as e: raise ValueError(f"Invalid operation {self} >> {other}: {e}") - def __lshift__(self, other: AnyTask | list[AnyTask]) -> AnyTask: + def __lshift__(self, other: AnyTask | list[AnyTask]) -> Self: try: self.append_upstream(other) return self