From b3f60c461b047c669e63a861339faf748f3bfe60 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Fri, 14 Apr 2017 15:40:15 +0200 Subject: [PATCH] Fix type hinting and function name for upgrade profile CURA-3540 --- plugins/XmlMaterialProfile/XmlMaterialProfile.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/XmlMaterialProfile/XmlMaterialProfile.py b/plugins/XmlMaterialProfile/XmlMaterialProfile.py index 76a33ce8e3b..1e1ea7ce590 100644 --- a/plugins/XmlMaterialProfile/XmlMaterialProfile.py +++ b/plugins/XmlMaterialProfile/XmlMaterialProfile.py @@ -3,6 +3,7 @@ import copy import io +from typing import Optional import xml.etree.ElementTree as ET from UM.Resources import Resources @@ -369,10 +370,10 @@ def clearData(self): self._dirty = False self._path = "" - def getConfigurationType(self) -> str: - return "material" # FIXME: not sure if this is correct + def getConfigurationTypeFromSerialized(self, serialized: str) -> Optional[str]: + return "material" - def getVersionFromSerialized(self, serialized: str) -> int: + def getVersionFromSerialized(self, serialized: str) -> Optional[int]: version = None data = ET.fromstring(serialized) metadata = data.iterfind("./um:metadata/*", self.__namespaces)