Currently, EITData_ is the direct parent for individual vendor EITData classes (e.g. DraegerEITData) and itself inherits from EITData. It would be nice if we can find a way to circumvent this intermediate class. However, that would lead to the following issue:
EITData.from_path() requires vendor as argument, so it can choose the right class to load the file.
DraegerEITData.from_path() does not allow vendor as argument, because the vendor is implicit in the choice of class. Of course the same is true for SentecEITData and TimpelEITData.
It is possible to override from_path() in each of the three subclasses, but that would not be DRY.
EITData_ removes vendor from the initializer with field(init=False).
Each subclass sets vendor to the proper value.
EITData_ also changes the arguments required for from_path().
I wasn't able to solve this without an intermediate class. Any other solution I came up with requires re-implementing from_path() in each of the three subclasses.
Originally posted by @psomhorst in #142 (comment)
Currently,
EITData_is the direct parent for individual vendor EITData classes (e.g.DraegerEITData) and itself inherits fromEITData. It would be nice if we can find a way to circumvent this intermediate class. However, that would lead to the following issue:Originally posted by @psomhorst in #142 (comment)