moved extracting the attributes into PlotDescription
This commit is contained in:
@ -136,7 +136,7 @@ class MainWindow(QMainWindow):
|
||||
data = {}
|
||||
for name, item in self.lst.items.items():
|
||||
desc = item.value
|
||||
data[name] = {k: v for k, v in desc.__dict__.items() if not k.startswith("_") and k != "name" and v is not None}
|
||||
data[name] = desc.to_dict()
|
||||
|
||||
write_dict(fn, data)
|
||||
|
||||
|
@ -36,4 +36,8 @@ class PlotDescription:
|
||||
return res
|
||||
|
||||
|
||||
def to_dict(self):
|
||||
return {k: v for k, v in self.__dict__.items() if not k.startswith("_") and k != "name" and v is not None}
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user