msto / dataclass_io

Read and write dataclasses.
MIT License
1 stars 0 forks source link

refactor: add FileFormat and extract header match assertion #8

Closed msto closed 6 months ago

msto commented 6 months ago

I extracted the logic to validate that a file's header matches the specified dataclass from the DataclassReader init method into the assertions module.

This 1) cleans up the reader's init method and 2) prepares the logic to be reused when validating a file is append able