model: Most repr() funcs don't fulfill the requirement obj == eval(repr(obj))
Most repr() funcs of classes don't fulfill the requirement obj == eval(repr(obj))
For example:
repr of Key:
Current:
def __repr__(self) -> str:
return "Key(local={}, id_type={}, value={})".format(self.local, self.id_type.name, self.value)
Should be:
def __repr__(self) -> str:
return "Key(type_={}, local={}, id_type={}, value={})".format(self.type, self.local, self.id_type.name, repr(self.value))
repr of Identifiable:
Current version looks like str but not repr:
def __repr__(self) -> str:
return "Identifier({}={})".format(self.id_type.name, self.id)
Should be:
def __str__(self) -> str:
return "Identifier({}={})".format(self.id_type.name, self.id)
def __repr__(self) -> str:
return "Identifier(id_={}, id_type={})".format(repr(self.id), self.id_type.name)