mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-15 20:46:01 +08:00
Fix type issues
This commit is contained in:
parent
eded0f0297
commit
412e5977a6
@ -128,7 +128,7 @@ if TYPE_CHECKING:
|
|||||||
numpy.seterr(all = "ignore")
|
numpy.seterr(all = "ignore")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from cura.CuraVersion import CuraVersion, CuraBuildType, CuraDebugMode, CuraSDKVersion
|
from cura.CuraVersion import CuraVersion, CuraBuildType, CuraDebugMode, CuraSDKVersion # type: ignore
|
||||||
except ImportError:
|
except ImportError:
|
||||||
CuraVersion = "master" # [CodeStyle: Reflecting imported value]
|
CuraVersion = "master" # [CodeStyle: Reflecting imported value]
|
||||||
CuraBuildType = ""
|
CuraBuildType = ""
|
||||||
|
@ -452,10 +452,10 @@ class MaterialManager(QObject):
|
|||||||
# - A fallback by GUID; If a material has been duplicated, it should also check if the original materials do have
|
# - A fallback by GUID; If a material has been duplicated, it should also check if the original materials do have
|
||||||
# a GUID. This should only be done if the material itself does not have a quality just yet.
|
# a GUID. This should only be done if the material itself does not have a quality just yet.
|
||||||
def getFallBackMaterialIdsByMaterial(self, material: InstanceContainer) -> List[str]:
|
def getFallBackMaterialIdsByMaterial(self, material: InstanceContainer) -> List[str]:
|
||||||
results = [] # List[str]
|
results = [] # type: List[str]
|
||||||
|
|
||||||
material_groups = self.getMaterialGroupListByGUID(material.getMetaDataEntry("GUID"))
|
material_groups = self.getMaterialGroupListByGUID(material.getMetaDataEntry("GUID"))
|
||||||
for material_group in material_groups:
|
for material_group in material_groups: # type: ignore
|
||||||
if material_group.name != material.getId():
|
if material_group.name != material.getId():
|
||||||
# If the material in the group is read only, put it at the front of the list (since that is the most
|
# If the material in the group is read only, put it at the front of the list (since that is the most
|
||||||
# likely one to get a result)
|
# likely one to get a result)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user