Skip to content

Commit 8bb5935

Browse files
authored
Fix cannot access local variable 'extra' where it is not associated with a value (#900)
1 parent 84be986 commit 8bb5935

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

temporalio/workflow.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1466,13 +1466,14 @@ def process(
14661466
self, msg: Any, kwargs: MutableMapping[str, Any]
14671467
) -> Tuple[Any, MutableMapping[str, Any]]:
14681468
"""Override to add workflow details."""
1469+
extra: Dict[str, Any] = {}
1470+
msg_extra: Dict[str, Any] = {}
1471+
14691472
if (
14701473
self.workflow_info_on_message
14711474
or self.workflow_info_on_extra
14721475
or self.full_workflow_info_on_extra
14731476
):
1474-
extra: Dict[str, Any] = {}
1475-
msg_extra: Dict[str, Any] = {}
14761477
runtime = _Runtime.maybe_current()
14771478
if runtime:
14781479
workflow_details = runtime.logger_details

0 commit comments

Comments
 (0)