@@ -324,7 +324,7 @@ def extract_props(tpe: RiverType) -> list[dict[str, RiverType]]:
324324 elif type .type == "array" and type .items :
325325 type_name , type_chunks = encode_type (type .items , prefix , base_model )
326326 typeddict_encoder .append ("TODO: dstewart" )
327- return (f"List [{ type_name } ]" , type_chunks )
327+ return (f"list [{ type_name } ]" , type_chunks )
328328 elif (
329329 type .type == "object"
330330 and type .patternProperties
@@ -387,9 +387,9 @@ def extract_props(tpe: RiverType) -> list[dict[str, RiverType]]:
387387 typeddict_encoder .append (f"x[{ repr (name )} ]" )
388388 else :
389389 assert type_name .startswith (
390- "List ["
390+ "list ["
391391 ) # in case we change to list[...]
392- _inner_type_name = type_name [len ("List [" ) : - len ("]" )]
392+ _inner_type_name = type_name [len ("list [" ) : - len ("]" )]
393393 typeddict_encoder .append (
394394 f"""[
395395 encode_{ _inner_type_name } (y)
@@ -493,7 +493,6 @@ def generate_river_client_module(
493493 from typing import (
494494 Any,
495495 Dict,
496- List,
497496 Literal,
498497 Optional,
499498 Mapping,
@@ -590,9 +589,9 @@ def __init__(self, client: river.Client[{handshake_type}]):
590589 procedure .init , RiverConcreteType
591590 ) and procedure .init .type in ["array" ]:
592591 assert init_type .startswith (
593- "List ["
592+ "list ["
594593 ) # in case we change to list[...]
595- _init_type_name = init_type [len ("List [" ) : - len ("]" )]
594+ _init_type_name = init_type [len ("list [" ) : - len ("]" )]
596595 render_init_method = (
597596 f"lambda xs: [encode_{ _init_type_name } (x) for x in xs]"
598597 )
@@ -612,9 +611,9 @@ def __init__(self, client: river.Client[{handshake_type}]):
612611 procedure .input , RiverConcreteType
613612 ) and procedure .input .type in ["array" ]:
614613 assert input_type .startswith (
615- "List ["
614+ "list ["
616615 ) # in case we change to list[...]
617- _input_type_name = input_type [len ("List [" ) : - len ("]" )]
616+ _input_type_name = input_type [len ("list [" ) : - len ("]" )]
618617 render_input_method = (
619618 f"lambda xs: [encode_{ _input_type_name } (x) for x in xs]"
620619 )
0 commit comments