Skip to content

Commit d3f9b9c

Browse files
committed
Add addtional type hints
1 parent 132d5e8 commit d3f9b9c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

python/restate/context.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ def generic_send(self,
327327
def awakeable(self,
328328
serde: Serde[T] = DefaultSerde(),
329329
type_hint: Optional[typing.Type[T]] = None
330-
) -> typing.Tuple[str, RestateDurableFuture[Any]]:
330+
) -> typing.Tuple[str, RestateDurableFuture[T]]:
331331
"""
332332
Returns the name of the awakeable and the future to be awaited.
333333
"""
@@ -388,7 +388,7 @@ def get(self,
388388
name: str,
389389
serde: Serde[T] = DefaultSerde(),
390390
type_hint: Optional[typing.Type[T]] = None
391-
) -> RestateDurableFuture[Optional[Any]]:
391+
) -> RestateDurableFuture[Optional[T]]:
392392
"""
393393
Retrieves the value associated with the given name.
394394
@@ -444,7 +444,7 @@ class WorkflowContext(ObjectContext):
444444
"""
445445

446446
@abc.abstractmethod
447-
def promise(self, name: str, serde: Serde[T] = DefaultSerde()) -> DurablePromise[Any]:
447+
def promise(self, name: str, serde: Serde[T] = DefaultSerde()) -> DurablePromise[T]:
448448
"""
449449
Returns a durable promise with the given name.
450450
"""
@@ -455,7 +455,7 @@ class WorkflowSharedContext(ObjectSharedContext):
455455
"""
456456

457457
@abc.abstractmethod
458-
def promise(self, name: str, serde: Serde[T] = DefaultSerde()) -> DurablePromise[Any]:
458+
def promise(self, name: str, serde: Serde[T] = DefaultSerde()) -> DurablePromise[T]:
459459
"""
460460
Returns a durable promise with the given name.
461461
"""

0 commit comments

Comments
 (0)