remove dataclass for ArchiveIndex in favor of plain dict to simplify schema file

This commit is contained in:
Nick Sweeting
2019-03-27 15:32:39 -04:00
parent 88721512d4
commit ea695b8bef
3 changed files with 38 additions and 64 deletions

View File

@@ -268,38 +268,3 @@ class Link:
'dom_url': static_url,
})
return canonical
@dataclass(frozen=True)
class ArchiveIndex:
info: str
version: str
source: str
docs: str
num_links: int
updated: str
links: List[Link]
schema: str = 'ArchiveIndex'
def __post_init__(self):
assert self.schema == self.__class__.__name__
def _asdict(self):
return asdict(self)
@dataclass
class RuntimeStats:
"""mutable stats counter for logging archiving timing info to CLI output"""
skipped: int
succeeded: int
failed: int
parse_start_ts: datetime
parse_end_ts: datetime
index_start_ts: datetime
index_end_ts: datetime
archiving_start_ts: datetime
archiving_end_ts: datetime