Skip to content

Commit

Permalink
Fix explain tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fantix committed Feb 3, 2025
1 parent e31586a commit 85f807a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions edb/server/compiler/explain/to_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
import enum
import uuid

from edb.ir import statypes


class ToJson:
def to_json(self) -> Any:
Expand All @@ -36,4 +38,6 @@ def json_hook(value: Any) -> Any:
return value.value
elif isinstance(value, (frozenset, set)):
return list(value)
elif isinstance(value, statypes.ScalarType):
return value.to_json()
raise TypeError(f"Cannot serialize {value!r}")

0 comments on commit 85f807a

Please sign in to comment.