Overview:
Slow, steady, test-backed changes to work toward converting the configs to types objects instead of dictionaries. This refactor should have no changes to existing functionality. When creating a new character log it first creates it as a CharacterLog object, then converts it to the old-style dictionary before appending it to the config named tuple in memory. When the day comes to move the named tuple config to a type-backed data models, we just remove the conversion and append the new object. :clap: :dash: . EZPZ
Re: changes to the models... There were a couple of changes I needed to make to the dataclasses in order to make them work and compatible with Python 3.9.
Changes:
add_char_log: move writing to disk outside of function & validating into the function
SerializedFileHandler: use pathlib instead of file.open
use config Character model
dataclasses python 3.9 compatibility
refactor create new characters with new models and convert to legacy config
Overview: Slow, steady, test-backed changes to work toward converting the configs to types objects instead of dictionaries. This refactor should have no changes to existing functionality. When creating a new character log it first creates it as a CharacterLog object, then converts it to the old-style dictionary before appending it to the config named tuple in memory. When the day comes to move the named tuple config to a type-backed data models, we just remove the conversion and append the new object. :clap: :dash: . EZPZ
Re: changes to the models... There were a couple of changes I needed to make to the dataclasses in order to make them work and compatible with Python 3.9.
Changes: