@@ -922,10 +922,6 @@ def __init__(self, client: river.Client[Any]):
922922 parse_output_method = "lambda x: None"
923923
924924 if procedure .type == "rpc" :
925- control_flow_keyword = "return "
926- if output_type == "None" :
927- control_flow_keyword = ""
928-
929925 current_chunks .extend (
930926 [
931927 reindent (
@@ -935,7 +931,7 @@ async def {name}(
935931 self,
936932 input: { render_type_expr (input_type )} ,
937933 ) -> { render_type_expr (output_type )} :
938- { control_flow_keyword } await self.client.send_rpc(
934+ return await self.client.send_rpc(
939935 { repr (schema_name )} ,
940936 { repr (name )} ,
941937 input,
@@ -970,9 +966,6 @@ async def {name}(
970966 ]
971967 )
972968 elif procedure .type == "upload" :
973- control_flow_keyword = "return "
974- if output_type == "None" :
975- control_flow_keyword = ""
976969 if init_type :
977970 assert render_init_method , "Expected an init renderer!"
978971 current_chunks .extend (
@@ -985,7 +978,7 @@ async def {name}(
985978 init: { init_type } ,
986979 inputStream: AsyncIterable[{ render_type_expr (input_type )} ],
987980 ) -> { output_type } :
988- { control_flow_keyword } await self.client.send_upload(
981+ return await self.client.send_upload(
989982 { repr (schema_name )} ,
990983 { repr (name )} ,
991984 init,
@@ -1009,7 +1002,7 @@ async def {name}(
10091002 self,
10101003 inputStream: AsyncIterable[{ render_type_expr (input_type )} ],
10111004 ) -> { render_type_expr (output_or_error_type )} :
1012- { control_flow_keyword } await self.client.send_upload(
1005+ return await self.client.send_upload(
10131006 { repr (schema_name )} ,
10141007 { repr (name )} ,
10151008 None,
0 commit comments