From f5654c93fe6adfaa9ccf9d7b244956f9522bc5fe Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Wed, 25 Sep 2024 00:20:13 +0200 Subject: [PATCH] feat: add return type to aleph.vm.utils.to_json --- src/aleph/vm/utils/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/aleph/vm/utils/__init__.py b/src/aleph/vm/utils/__init__.py index 507a41e0..15a57819 100644 --- a/src/aleph/vm/utils/__init__.py +++ b/src/aleph/vm/utils/__init__.py @@ -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