Skip to content

Commit 5e5f191

Browse files
committed
Use empty string instead of None to satisfy mypy
1 parent e4fb4ff commit 5e5f191

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

temporalio/nexus/_operation_context.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -569,13 +569,13 @@ def _event_reference_from_query_params(
569569
"""
570570
query_params = urllib.parse.parse_qs(raw_query_params)
571571

572-
[reference_type] = query_params.get("referenceType") or [None]
572+
[reference_type] = query_params.get("referenceType") or [""]
573573
if reference_type != "EventReference":
574574
raise ValueError(
575575
f"Expected Nexus link URL query parameter referenceType to be EventReference but got: {reference_type}"
576576
)
577577
# event type
578-
[raw_event_type_name] = query_params.get(LINK_EVENT_TYPE_PARAM_NAME) or [None]
578+
[raw_event_type_name] = query_params.get(LINK_EVENT_TYPE_PARAM_NAME) or [""]
579579
if not raw_event_type_name:
580580
raise ValueError(f"query params do not contain event type: {query_params}")
581581
if raw_event_type_name.startswith("EVENT_TYPE_"):
@@ -589,7 +589,7 @@ def _event_reference_from_query_params(
589589

590590
# event id
591591
event_id = 0
592-
[raw_event_id] = query_params.get(LINK_EVENT_ID_PARAM_NAME) or [None]
592+
[raw_event_id] = query_params.get(LINK_EVENT_ID_PARAM_NAME) or [""]
593593
if raw_event_id:
594594
try:
595595
event_id = int(raw_event_id)

0 commit comments

Comments
 (0)