Skip to content
Snippets Groups Projects
Commit 604b9fc7 authored by Henrik tom Wörden's avatar Henrik tom Wörden
Browse files

DOC: document _wrap a bit

parent 89b28858
No related branches found
No related tags found
2 merge requests!95DOC: Added CITATION.cff to the list of files in the release guide where the...,!94Get parents recursively
...@@ -102,6 +102,8 @@ class Entity: ...@@ -102,6 +102,8 @@ class Entity:
self._checksum = None self._checksum = None
self._size = None self._size = None
self._upload = None self._upload = None
# If an entity is used (e.g. as parent), it is wrapped instead of being used directly.
# see Entity._wrap()
self._wrapped_entity = None self._wrapped_entity = None
self._version = None self._version = None
self._cuid = None self._cuid = None
...@@ -1331,6 +1333,12 @@ out: List[Entity] ...@@ -1331,6 +1333,12 @@ out: List[Entity]
flags=flags)[0] flags=flags)[0]
def _wrap(self, entity): def _wrap(self, entity):
"""
When entity shall be used as parent or property it is not added to the corresponding list
(such as the parent list) directly, but another Entity object is created and the original
Entity is wrapped using this function
TODO: document here and in dev docs why this is done.
"""
self._wrapped_entity = entity self._wrapped_entity = entity
return self return self
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment