Skip to content

Commit 14c1a22

Browse files
committed
Partially workaround mypy bug?
temporalio/client.py:840: error: Overloaded function implementation does not accept all possible arguments of signature 1 [misc] temporalio/client.py:840: error: Overloaded function implementation does not accept all possible arguments of signature 2 [misc] temporalio/client.py:840: error: Overloaded function implementation does not accept all possible arguments of signature 3 [misc] temporalio/client.py:926: error: Overloaded function implementation does not accept all possible arguments of signature 1 [misc] temporalio/client.py:926: error: Overloaded function implementation does not accept all possible arguments of signature 2 [misc] temporalio/client.py:926: error: Overloaded function implementation does not accept all possible arguments of signature 3 [misc] After this commit would still produce temporalio/client.py:840: error: Overloaded function implementation does not accept all possible arguments of signature 1 [misc] temporalio/client.py:926: error: Overloaded function implementation does not accept all possible arguments of signature 1 [misc] hence type: ignore
1 parent 7892592 commit 14c1a22

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

temporalio/client.py

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -786,8 +786,8 @@ async def execute_update_with_start(
786786
self,
787787
update: temporalio.workflow.UpdateMethodMultiParam[[SelfType], LocalReturnType],
788788
*,
789-
id: Optional[str] = None,
790789
start_workflow_operation: WithStartWorkflowOperation[SelfType, ReturnType],
790+
id: Optional[str] = None,
791791
rpc_metadata: Mapping[str, str] = {},
792792
rpc_timeout: Optional[timedelta] = None,
793793
) -> LocalReturnType: ...
@@ -801,8 +801,8 @@ async def execute_update_with_start(
801801
],
802802
arg: ParamType,
803803
*,
804-
id: Optional[str] = None,
805804
start_workflow_operation: WithStartWorkflowOperation[SelfType, ReturnType],
805+
id: Optional[str] = None,
806806
rpc_metadata: Mapping[str, str] = {},
807807
rpc_timeout: Optional[timedelta] = None,
808808
) -> LocalReturnType: ...
@@ -816,8 +816,8 @@ async def execute_update_with_start(
816816
],
817817
*,
818818
args: MultiParamSpec.args, # pyright: ignore
819-
id: Optional[str] = None,
820819
start_workflow_operation: WithStartWorkflowOperation[SelfType, ReturnType],
820+
id: Optional[str] = None,
821821
rpc_metadata: Mapping[str, str] = {},
822822
rpc_timeout: Optional[timedelta] = None,
823823
) -> LocalReturnType: ...
@@ -829,34 +829,36 @@ async def execute_update_with_start(
829829
update: str,
830830
arg: Any = temporalio.common._arg_unset,
831831
*,
832+
start_workflow_operation: WithStartWorkflowOperation[SelfType, ReturnType],
832833
args: Sequence[Any] = [],
833834
id: Optional[str] = None,
834835
result_type: Optional[Type] = None,
835-
start_workflow_operation: WithStartWorkflowOperation[SelfType, ReturnType],
836836
rpc_metadata: Mapping[str, str] = {},
837837
rpc_timeout: Optional[timedelta] = None,
838838
) -> Any: ...
839839

840-
async def execute_update_with_start(
840+
# TODO (dan):
841+
# temporalio/client.py:840: error: Overloaded function implementation does not accept all possible arguments of signature 1 [misc]
842+
async def execute_update_with_start( # type: ignore
841843
self,
842844
update: Union[str, Callable],
843845
arg: Any = temporalio.common._arg_unset,
844846
*,
847+
start_workflow_operation: WithStartWorkflowOperation[SelfType, ReturnType],
845848
args: Sequence[Any] = [],
846849
id: Optional[str] = None,
847850
result_type: Optional[Type] = None,
848-
start_workflow_operation: WithStartWorkflowOperation[SelfType, ReturnType],
849851
rpc_metadata: Mapping[str, str] = {},
850852
rpc_timeout: Optional[timedelta] = None,
851853
) -> Any:
852854
handle = await self._start_update_with_start(
853855
update,
854856
arg,
855857
args=args,
858+
start_workflow_operation=start_workflow_operation,
856859
wait_for_stage=WorkflowUpdateStage.COMPLETED,
857860
id=id,
858861
result_type=result_type,
859-
start_workflow_operation=start_workflow_operation,
860862
rpc_metadata=rpc_metadata,
861863
rpc_timeout=rpc_timeout,
862864
)
@@ -868,9 +870,9 @@ async def start_update_with_start(
868870
self,
869871
update: temporalio.workflow.UpdateMethodMultiParam[[SelfType], LocalReturnType],
870872
*,
873+
start_workflow_operation: WithStartWorkflowOperation[SelfType, ReturnType],
871874
wait_for_stage: WorkflowUpdateStage,
872875
id: Optional[str] = None,
873-
start_workflow_operation: WithStartWorkflowOperation[SelfType, ReturnType],
874876
rpc_metadata: Mapping[str, str] = {},
875877
rpc_timeout: Optional[timedelta] = None,
876878
) -> WorkflowUpdateHandle[LocalReturnType]: ...
@@ -884,9 +886,9 @@ async def start_update_with_start(
884886
],
885887
arg: ParamType,
886888
*,
889+
start_workflow_operation: WithStartWorkflowOperation[SelfType, ReturnType],
887890
wait_for_stage: WorkflowUpdateStage,
888891
id: Optional[str] = None,
889-
start_workflow_operation: WithStartWorkflowOperation[SelfType, ReturnType],
890892
rpc_metadata: Mapping[str, str] = {},
891893
rpc_timeout: Optional[timedelta] = None,
892894
) -> WorkflowUpdateHandle[LocalReturnType]: ...
@@ -900,9 +902,9 @@ async def start_update_with_start(
900902
],
901903
*,
902904
args: MultiParamSpec.args, # pyright: ignore
905+
start_workflow_operation: WithStartWorkflowOperation[SelfType, ReturnType],
903906
wait_for_stage: WorkflowUpdateStage,
904907
id: Optional[str] = None,
905-
start_workflow_operation: WithStartWorkflowOperation[SelfType, ReturnType],
906908
rpc_metadata: Mapping[str, str] = {},
907909
rpc_timeout: Optional[timedelta] = None,
908910
) -> WorkflowUpdateHandle[LocalReturnType]: ...
@@ -914,25 +916,27 @@ async def start_update_with_start(
914916
update: str,
915917
arg: Any = temporalio.common._arg_unset,
916918
*,
919+
start_workflow_operation: WithStartWorkflowOperation[SelfType, ReturnType],
917920
wait_for_stage: WorkflowUpdateStage,
918921
args: Sequence[Any] = [],
919922
id: Optional[str] = None,
920923
result_type: Optional[Type] = None,
921-
start_workflow_operation: WithStartWorkflowOperation[SelfType, ReturnType],
922924
rpc_metadata: Mapping[str, str] = {},
923925
rpc_timeout: Optional[timedelta] = None,
924926
) -> WorkflowUpdateHandle[Any]: ...
925927

926-
async def start_update_with_start(
928+
# TODO (dan):
929+
# temporalio/client.py:926: error: Overloaded function implementation does not accept all possible arguments of signature 1 [misc]
930+
async def start_update_with_start( # type: ignore
927931
self,
928932
update: Union[str, Callable],
929933
arg: Any = temporalio.common._arg_unset,
930934
*,
935+
start_workflow_operation: WithStartWorkflowOperation[SelfType, ReturnType],
931936
wait_for_stage: WorkflowUpdateStage,
932937
args: Sequence[Any] = [],
933938
id: Optional[str] = None,
934939
result_type: Optional[Type] = None,
935-
start_workflow_operation: WithStartWorkflowOperation[SelfType, ReturnType],
936940
rpc_metadata: Mapping[str, str] = {},
937941
rpc_timeout: Optional[timedelta] = None,
938942
) -> WorkflowUpdateHandle[Any]:

0 commit comments

Comments
 (0)