From ac0c8ee5d93ec88491e5ed5c14b71415c0f94fbc Mon Sep 17 00:00:00 2001 From: Mike Auty Date: Sun, 18 Feb 2024 23:59:08 +0000 Subject: [PATCH] Renderers: Convert column to dataclass Slightly heavier weight classes rather than tuples, but allows greater flexibility and future assignment of new attribtues. --- volatility3/framework/interfaces/renderers.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/volatility3/framework/interfaces/renderers.py b/volatility3/framework/interfaces/renderers.py index 4692a112cb..5835277740 100644 --- a/volatility3/framework/interfaces/renderers.py +++ b/volatility3/framework/interfaces/renderers.py @@ -9,6 +9,7 @@ suitable output. """ +import dataclasses import datetime from abc import abstractmethod, ABCMeta from collections import abc @@ -26,7 +27,13 @@ Union, ) -Column = NamedTuple("Column", [("name", str), ("type", Any), ("extra", bool)]) + +@dataclasses.dataclass +class Column: + name: str + type: Any + extra: bool = True + RenderOption = Any