Open kopecs opened 6 months ago
atdpy translates the atd definition
atdpy
type t = unit
to
@dataclass class T: """Original type: t""" value: None @classmethod def from_json(cls, x: Any) -> 'T': return cls(Unit.from_json(x)) def to_json(self) -> Any: return (lambda x: x.to_json())(self.value) @classmethod def from_json_string(cls, x: str) -> 'T': return cls.from_json(json.loads(x)) def to_json_string(self, **kw: Any) -> str: return json.dumps(self.to_json(), **kw)
However, there is no such class Unit as required by the from_json implementation, and None doesn't have a to_json method, as required by to_json.
Unit
from_json
None
to_json
atdpy
translates the atd definitionto
However, there is no such class
Unit
as required by thefrom_json
implementation, andNone
doesn't have ato_json
method, as required byto_json
.