draft: rewriting downloading

This commit is contained in:
Hellow
2024-05-13 21:45:12 +02:00
parent 0e6fe8187a
commit b09d6f2691
6 changed files with 114 additions and 24 deletions

View File

@@ -205,6 +205,7 @@ class OuterProxy:
if __other is None:
return
a_id = self.id
a = self
b = __other
@@ -227,6 +228,8 @@ class OuterProxy:
a._inner.__merge__(old_inner, **kwargs)
del old_inner
self.id = a_id
def __merge__(self, __other: Optional[OuterProxy], **kwargs):
self.merge(__other, **kwargs)
@@ -337,3 +340,11 @@ class OuterProxy:
def __repr__(self):
return f"{type(self).__name__}({self.title_string})"
def get_child_collections(self):
for collection_string_attribute in self.DOWNWARDS_COLLECTION_STRING_ATTRIBUTES:
yield self.__getattribute__(collection_string_attribute)
def get_parent_collections(self):
for collection_string_attribute in self.UPWARDS_COLLECTION_STRING_ATTRIBUTES:
yield self.__getattribute__(collection_string_attribute)