Skip to content

Commit aa1e501

Browse files
Accidentally removed array encoder (#80)
Why === During #69 I fixed a bug with `Any` type derivation, in so doing I neglected to account for array encoders. ```diff async def stageFiles( self, - input: Any, + input: GitStagefilesInput, ) -> GitStagefilesOutput: ``` This fixes the following: ```diff - lambda x: x, + lambda x: TypeAdapter(List[FooBarBaz]).dump_python( + x, # type: ignore[arg-type] + by_alias=True, + exclude_none=True, + ), ``` What changed ============ - Avoid incorrectly stubbing out array encoders Test plan ========= Manually running confirmed the fix
1 parent ecac798 commit aa1e501

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

replit_river/codegen/client.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -531,10 +531,9 @@ def __init__(self, client: river.Client[{handshake_type}]):
531531
exclude_none=True,
532532
)
533533
""".rstrip()
534-
if (
535-
isinstance(procedure.input, RiverConcreteType)
536-
and procedure.input.type != "object"
537-
):
534+
if isinstance(
535+
procedure.input, RiverConcreteType
536+
) and procedure.input.type not in ["object", "array"]:
538537
render_input_method = "lambda x: x"
539538

540539
if output_type == "None":

0 commit comments

Comments
 (0)