mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 23:23:57 -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 .ExtruderStack import ExtruderStack
|
||||
from .CuraContainerStack import CuraContainerStack
|
||||
from typing import Optional
|
||||
|
||||
|
||||
## Contains helper functions to create new machines.
|
||||
class CuraStackBuilder:
|
||||
|
@ -20,7 +22,7 @@ class CuraStackBuilder:
|
|||
#
|
||||
# \return The new global stack or None if an error occurred.
|
||||
@classmethod
|
||||
def createMachine(cls, name: str, definition_id: str) -> GlobalStack:
|
||||
def createMachine(cls, name: str, definition_id: str) -> Optional[GlobalStack]:
|
||||
registry = ContainerRegistry.getInstance()
|
||||
definitions = registry.findDefinitionContainers(id = definition_id)
|
||||
if not definitions:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue