mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-03 03:54:01 -06:00
Fixed wrong typehinting
This commit is contained in:
parent
3dae6b4bbf
commit
58ab9dcd09
1 changed files with 3 additions and 1 deletions
|
@ -10,6 +10,8 @@ from UM.Settings.ContainerRegistry import ContainerRegistry
|
||||||
from .GlobalStack import GlobalStack
|
from .GlobalStack import GlobalStack
|
||||||
from .ExtruderStack import ExtruderStack
|
from .ExtruderStack import ExtruderStack
|
||||||
from .CuraContainerStack import CuraContainerStack
|
from .CuraContainerStack import CuraContainerStack
|
||||||
|
from typing import Optional
|
||||||
|
|
||||||
|
|
||||||
## Contains helper functions to create new machines.
|
## Contains helper functions to create new machines.
|
||||||
class CuraStackBuilder:
|
class CuraStackBuilder:
|
||||||
|
@ -20,7 +22,7 @@ class CuraStackBuilder:
|
||||||
#
|
#
|
||||||
# \return The new global stack or None if an error occurred.
|
# \return The new global stack or None if an error occurred.
|
||||||
@classmethod
|
@classmethod
|
||||||
def createMachine(cls, name: str, definition_id: str) -> GlobalStack:
|
def createMachine(cls, name: str, definition_id: str) -> Optional[GlobalStack]:
|
||||||
registry = ContainerRegistry.getInstance()
|
registry = ContainerRegistry.getInstance()
|
||||||
definitions = registry.findDefinitionContainers(id = definition_id)
|
definitions = registry.findDefinitionContainers(id = definition_id)
|
||||||
if not definitions:
|
if not definitions:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue