Skip to content

Commit ebc8c47

Browse files
committed
Don't warn on lack of type annotations on op handler
1 parent 9780f2b commit ebc8c47

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

temporalio/nexus/_util.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -78,19 +78,10 @@ def _get_start_method_input_and_output_type_annotations(
7878
try:
7979
type_annotations = typing.get_type_hints(start)
8080
except TypeError:
81-
warnings.warn(
82-
f"Expected decorated start method {start} to have type annotations"
83-
)
8481
return None, None
8582
output_type = type_annotations.pop("return", None)
8683

8784
if len(type_annotations) != 2:
88-
suffix = f": {type_annotations}" if type_annotations else ""
89-
warnings.warn(
90-
f"Expected decorated start method {start} to have exactly 2 "
91-
f"type-annotated parameters (ctx and input), but it has {len(type_annotations)}"
92-
f"{suffix}."
93-
)
9485
input_type = None
9586
else:
9687
ctx_type, input_type = type_annotations.values()

0 commit comments

Comments
 (0)