Skip to content

Commit

Permalink
Fix type hinting and function name for upgrade profile
Browse files Browse the repository at this point in the history
CURA-3540
  • Loading branch information
LipuFei committed Apr 14, 2017
1 parent 4f2c76e commit b3f60c4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions plugins/XmlMaterialProfile/XmlMaterialProfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

import copy
import io
from typing import Optional
import xml.etree.ElementTree as ET

from UM.Resources import Resources
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit b3f60c4

Please sign in to comment.