SPF-OST / pytrnsys_gui

Graphical user interface for pytrnsys
https://pytrnsys.readthedocs.io
GNU Lesser General Public License v3.0
3 stars 4 forks source link

Serialization model for single and double tee pieces should be unified. #457

Open zuckerruebe opened 1 year ago

zuckerruebe commented 1 year ago

As a developer I'd like to unify the serialization classes for single and double pipe tee pieces to have less classes to maintain. This requires updating the serialization framework to allow for a set of superseded classes in

    @classmethod
    @_abc.abstractmethod
    def getSupersededClass(cls) -> _tp.Type[UpgradableJsonSchemaMixinVersion0]:
        raise NotImplementedError()

i.e.

    import collections.abc as _cabc
    # ...
    @classmethod
    @_abc.abstractmethod
    def getSupersededClass(cls) -> _cabc.Set[_tp.Type[UpgradableJsonSchemaMixinVersion0]]:
        raise NotImplementedError()