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:
Mike Auty
2024-02-18 23:59:12 +00:00
parent 262642ee37
commit ac0c8ee5d9
@@ -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