Plugins code cleanup 0.1

This commit is contained in:
Jokob-sk
2023-09-01 08:11:28 +10:00
parent 9afed6e43b
commit b5e933ba12

View File

@@ -154,5 +154,19 @@ class Plugin_Objects:
fp.close()
def __add__(self, other):
if isinstance(other, Plugin_Objects):
new_objects = self.objects + other.objects
new_result_file = self.result_file # You might want to adjust this
new_instance = Plugin_Objects(new_result_file)
new_instance.objects = new_objects
return new_instance
else:
raise TypeError("Unsupported operand type for +")
def __len__(self):
return len(self.objects)