Renderers: Add in fallback method for formatting cellrenderers

This commit is contained in:
Mike Auty
2025-03-23 00:42:13 +00:00
parent 94d6f4f131
commit 6af8cd09f0
@@ -153,6 +153,10 @@ class Disassembly:
raise TypeError("Offset must be an integer type")
self.offset = offset
def __str__(self) -> str:
"""Fallback method of rendering"""
return str(self.data)
@dataclasses.dataclass
class LayerData:
@@ -182,6 +186,11 @@ class LayerData:
no_surrounding=no_surrounding,
)
def __str__(self) -> str:
"""Fallback method of rendering"""
data = self.context.layers[self.layer_name].read(self.offset, self.length, True)
return str(data)
# We don't class these off a shared base, because the BaseTypes must only
# contain the types that the validator will accept (which would not include the base)