Skip to content

Commit

Permalink
fix lib naming bugs
Browse files Browse the repository at this point in the history
Signed-off-by: HH <hhcs9527@gmail.com>
  • Loading branch information
hhcs9527 committed Jul 25, 2023
1 parent fcab254 commit 427e807
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions flytekit/core/type_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ def to_literal(self, ctx: FlyteContext, python_val: T, python_type: Type[T], exp
f"Dataclass {python_type} should be decorated with @dataclass_json to be " f"serialized correctly"
)
self._serialize_flyte_type(python_val, python_type)
cb = CodeBuilder(python_type, format_name="json", encoder=json.dumps, decoder=json.loads) # type: ignore
cb = CodeBuilder(python_type, format_name="json", encoder=_json.dumps, decoder=_json.loads) # type: ignore
cb.add_pack_method()

return Literal(
Expand Down Expand Up @@ -607,7 +607,7 @@ def to_python_value(self, ctx: FlyteContext, lv: Literal, expected_python_type:
f"serialized correctly"
)
json_str = _json_format.MessageToJson(lv.scalar.generic)
cb = CodeBuilder(expected_python_type, format_name="json", encoder=json.dumps, decoder=json.loads) # type: ignore
cb = CodeBuilder(expected_python_type, format_name="json", encoder=_json.dumps, decoder=_json.loads) # type: ignore
cb.add_unpack_method()

dc = cast(DataClassJsonMixin, expected_python_type).from_json(json_str) # type: ignore
Expand Down

0 comments on commit 427e807

Please sign in to comment.