CURA-5330 Fix typing and code-style in the ContainerNode and all the

related children, and QualityGroup and its children.
Also fix the related calls in the managers.
This commit is contained in:
Diego Prado Gesto 2018-06-13 10:55:57 +02:00
parent f860b9c99e
commit 6e364f0895
10 changed files with 44 additions and 34 deletions

View file

@ -1,7 +1,6 @@
# Copyright (c) 2018 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
from typing import Optional
from typing import Optional, Dict
from .ContainerNode import ContainerNode
@ -15,7 +14,6 @@ from .ContainerNode import ContainerNode
class MaterialNode(ContainerNode):
__slots__ = ("material_map", "children_map")
def __init__(self, metadata: Optional[dict] = None):
def __init__(self, metadata: Optional[dict] = None) -> None:
super().__init__(metadata = metadata)
self.material_map = {} # material_root_id -> material_node
self.children_map = {} # mapping for the child nodes
self.material_map = {} # type: Dict[str, MaterialNode] # material_root_id -> material_node