mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-09-10 11:47:38 +02:00
Renderers: Convert column to dataclass
Slightly heavier weight classes rather than tuples, but allows greater flexibility and future assignment of new attribtues.
This commit is contained in:
@@ -9,6 +9,7 @@ renderer interface which can interact with a TreeGrid to produce
|
||||
suitable output.
|
||||
"""
|
||||
|
||||
import dataclasses
|
||||
import datetime
|
||||
from abc import abstractmethod, ABCMeta
|
||||
from collections import abc
|
||||
@@ -26,7 +27,13 @@ from typing import (
|
||||
Union,
|
||||
)
|
||||
|
||||
Column = NamedTuple("Column", [("name", str), ("type", Any), ("extra", bool)])
|
||||
|
||||
@dataclasses.dataclass
|
||||
class Column:
|
||||
name: str
|
||||
type: Any
|
||||
extra: bool = True
|
||||
|
||||
|
||||
RenderOption = Any
|
||||
|
||||
|
||||
Reference in New Issue
Block a user