mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-03 01:04:35 +08:00
Fix type hinting for getFallbackMaterialIdByMaterialType()
This commit is contained in:
parent
a6f22fd9cc
commit
d372fc75e7
@ -329,7 +329,7 @@ class MaterialManager(QObject):
|
||||
# This function returns the generic root material ID for the given material type, where material types are "PLA",
|
||||
# "ABS", etc.
|
||||
#
|
||||
def getFallbackMaterialIdByMaterialType(self, material_type: str) -> str:
|
||||
def getFallbackMaterialIdByMaterialType(self, material_type: str) -> Optional[str]:
|
||||
# For safety
|
||||
if material_type not in self._fallback_materials_map:
|
||||
Logger.log("w", "The material type [%s] does not have a fallback material" % material_type)
|
||||
|
Loading…
x
Reference in New Issue
Block a user