Skip to content

Commit ce654cc

Browse files
This case should have been handled above by is_literal
1 parent 28d6171 commit ce654cc

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

replit_river/codegen/client.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def is_literal(tpe: RiverType) -> bool:
8585
if isinstance(tpe, RiverUnionType):
8686
return all(is_literal(t) for t in tpe.anyOf)
8787
elif isinstance(tpe, RiverConcreteType):
88-
return tpe.type in set(["string", "number", "boolean"])
88+
return tpe.type not in set(["object", "array"])
8989
else:
9090
return False
9191

@@ -604,10 +604,6 @@ def __init__(self, client: river.Client[{handshake_type}]):
604604
lambda x: TypeAdapter({input_type})
605605
.validate_python
606606
""".rstrip()
607-
if isinstance(
608-
procedure.init, RiverConcreteType
609-
) and procedure.init.type not in ["object", "array"]:
610-
render_init_method = "lambda x: x"
611607

612608
# Input renderer
613609
if typed_dict_inputs:

0 commit comments

Comments
 (0)