Don't make parent a common property

Instead we use properly-typed and appropriately-named variables in each of the sub classes.

Contributes to issue CURA-6600.
This commit is contained in:
Ghostkeeper 2019-08-06 16:31:57 +02:00
parent d3dc36c187
commit 8ec1c31b58
No known key found for this signature in database
GPG key ID: 86BEF881AE2CF276
4 changed files with 27 additions and 27 deletions

View file

@ -18,10 +18,8 @@ class ContainerNode:
## Creates a new node for the container tree.
# \param container_id The ID of the container that this node should
# represent.
# \param parent The parent container node, if any.
def __init__(self, container_id: str, parent: Optional["ContainerNode"]) -> None:
def __init__(self, container_id: str) -> None:
self.container_id = container_id
self.parent = parent
self._container = None # type: Optional[InstanceContainer]
self.children_map = {} # type: Dict[str, ContainerNode] # Mapping from container ID to container node.