Skip to content

Commit 09be82e

Browse files
committed
Add docstrings, cleanup
1 parent d8c4f17 commit 09be82e

File tree

3 files changed

+2
-2
lines changed

3 files changed

+2
-2
lines changed

temporalio/activity.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,7 @@ class _CompleteAsyncError(BaseException):
470470
def payload_converter() -> temporalio.converter.PayloadConverter:
471471
"""Get the payload converter for the current activity.
472472
473+
The returned converter has :py:class:`temporalio.converter.ActivitySerializationContext` set.
473474
This is often used for dynamic activities to convert payloads.
474475
"""
475476
return _Context.current().payload_converter

temporalio/converter.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@ class ActivitySerializationContext(BaseWorkflowSerializationContext):
139139
is_local: bool
140140

141141

142-
# TODO: duck typing or nominal typing?
143142
class WithSerializationContext(ABC):
144143
"""Interface for classes that can use serialization context.
145144

temporalio/workflow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@
6161
import temporalio.workflow
6262
from temporalio.nexus._util import ServiceHandlerT
6363

64-
from .api.failure.v1.message_pb2 import Failure
6564
from .types import (
6665
AnyType,
6766
CallableAsyncNoParam,
@@ -1148,6 +1147,7 @@ def patched(id: str) -> bool:
11481147
def payload_converter() -> temporalio.converter.PayloadConverter:
11491148
"""Get the payload converter for the current workflow.
11501149
1150+
The returned converter has :py:class:`temporalio.converter.WorkflowSerializationContext` set.
11511151
This is often used for dynamic workflows/signals/queries to convert
11521152
payloads.
11531153
"""

0 commit comments

Comments
 (0)