Skip to content

Commit

Permalink
feat: add return type to aleph.vm.utils.to_json
Browse files Browse the repository at this point in the history
  • Loading branch information
Psycojoker authored and hoh committed Sep 25, 2024
1 parent 5518086 commit f5654c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/aleph/vm/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ async def get_ref_from_dns(domain):
return record[0].text


def to_json(o: Any):
def to_json(o: Any) -> dict | str:
if hasattr(o, "to_dict"): # default method
return o.to_dict()
elif hasattr(o, "dict"): # Pydantic
Expand Down

0 comments on commit f5654c9

Please sign in to comment.