| 13 | |
| 14 | @dc.dataclass |
| 15 | class ViewState: |
| 16 | # maybe a FileHandler interface?? |
| 17 | blocks: Blocks |
| 18 | file_entry_klass: dc.InitVar[t.Type[FileEntry]] |
| 19 | store: FileStore = dc.field(init=False) |
| 20 | view_xml: ViewXML = "" |
| 21 | entries: t.Dict[str, str] = dc.field(default_factory=dict) |
| 22 | dir_path: dc.InitVar[t.Optional[Path]] = None |
| 23 | |
| 24 | def __post_init__(self, file_entry_klass, dir_path): |
| 25 | # TODO - should we use a lambda for file_entry_klass with dir_path captured? |
| 26 | self.store = FileStore(fw_klass=file_entry_klass, assets_dir=dir_path) |
| 27 | |
| 28 | |
| 29 | P_IN = t.TypeVar("P_IN") |
no outgoing calls