Add some missing typing

This commit is contained in:
Jaime van Kessel 2020-01-10 14:25:35 +01:00
parent 3e07105edf
commit 81b33b8649
No known key found for this signature in database
GPG key ID: 3710727397403C91
18 changed files with 73 additions and 59 deletions

View file

@ -30,7 +30,7 @@ if TYPE_CHECKING:
# nodes that have children) but that child node may be a node representing the
# empty instance container.
class ContainerTree:
__instance = None
__instance = None # type: Optional["ContainerTree"]
@classmethod
def getInstance(cls):
@ -75,7 +75,7 @@ class ContainerTree:
return self.machines[global_stack.definition.getId()].getQualityChangesGroups(variant_names, material_bases, extruder_enabled)
## Ran after completely starting up the application.
def _onStartupFinished(self):
def _onStartupFinished(self) -> None:
currently_added = ContainerRegistry.getInstance().findContainerStacks() # Find all currently added global stacks.
JobQueue.getInstance().add(self._MachineNodeLoadJob(self, currently_added))
@ -137,7 +137,7 @@ class ContainerTree:
# \param container_stacks All of the stacks to pre-load the container
# trees for. This needs to be provided from here because the stacks
# need to be constructed on the main thread because they are QObject.
def __init__(self, tree_root: "ContainerTree", container_stacks: List["ContainerStack"]):
def __init__(self, tree_root: "ContainerTree", container_stacks: List["ContainerStack"]) -> None:
self.tree_root = tree_root
self.container_stacks = container_stacks
super().__init__()