MCPcopy Create free account
hub / github.com/dabeaz-course/python-mastery / TableFormatter

Class TableFormatter

Solutions/9_4/structly/tableformat/formatter.py:13–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11 formatter.row(rowdata)
12
13class TableFormatter(ABC):
14 _formats = { }
15
16 @classmethod
17 def __init_subclass__(cls):
18 name = cls.__module__.split('.')[-1]
19 TableFormatter._formats[name] = cls
20
21 @abstractmethod
22 def headings(self, headers):
23 pass
24
25 @abstractmethod
26 def row(self, rowdata):
27 pass
28
29class ColumnFormatMixin:
30 formats = []

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected