UNCLASSIFIED - NO CUI

Skip to content

Make the models into dataclasses

Mark Howard requested to merge sql_dataclass into master

With SQL alchemy 2.0, we can combine dataclasses with our models. This gives us a tighter rein on the __init__ methods, while providing us other special methods like __repr (useful for debugging purposes) for "free".

To keep test changes as minimal as possible, helper functions were created just for tests to allow creating instances of the models without declaring every individual attribute.

user_crud changes were due to using an empty initializer before. User()

Edited by Mark Howard

Merge request reports