Fix typing of approximate diameter and add typing to function for it

Seems I forgot to add typing and that's biting my bum right now.

Contributes to issue CURA-6600.
This commit is contained in:
Ghostkeeper 2019-08-27 17:21:05 +02:00
parent 3952366798
commit 9297890d78
No known key found for this signature in database
GPG key ID: 86BEF881AE2CF276
2 changed files with 2 additions and 2 deletions

View file

@ -79,7 +79,7 @@ class VariantNode(ContainerNode):
# material.
# \return The node for the preferred material, or any arbitrary material
# if there is no match.
def preferredMaterial(self, approximate_diameter) -> MaterialNode:
def preferredMaterial(self, approximate_diameter: int) -> MaterialNode:
for base_material, material_node in self.materials.items():
if self.machine.preferred_material in base_material and approximate_diameter == int(material_node.getMetaDataEntry("approximate_diameter")):
return material_node