Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions src/replit_river/codegen/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -514,25 +514,6 @@ def extract_props(tpe: RiverType) -> list[dict[str, RiverType]]:
in_module,
permit_unknown_members=permit_unknown_members,
)
# TODO(dstewart): This structure changed since we were incorrectly leaking
# ListTypeExprs into codegen. This generated code is
# probably wrong.
match type_name:
case ListTypeExpr(inner_type_name):
typeddict_encoder.append(
f"encode_{render_literal_type(inner_type_name)}(x)"
)
case DictTypeExpr(_):
raise ValueError(
"What does it mean to try and encode a dict in this position?"
)
case LiteralTypeExpr(const):
typeddict_encoder.append(repr(const))
case TypeName(value):
typeddict_encoder.append(f"encode_{value}(x)")
case other:
_o1: NoneTypeExpr | OpenUnionTypeExpr | UnionTypeExpr = other
raise ValueError(f"What does it mean to have {_o1} here?")
return (DictTypeExpr(type_name), module_info, type_chunks, encoder_names)
assert type.type == "object", type.type

Expand Down
Loading