mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-13 01:37:51 -06:00
Fix type hinting and function name for upgrade profile
CURA-3540
This commit is contained in:
parent
4f2c76e462
commit
b3f60c461b
1 changed files with 4 additions and 3 deletions
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
import copy
|
import copy
|
||||||
import io
|
import io
|
||||||
|
from typing import Optional
|
||||||
import xml.etree.ElementTree as ET
|
import xml.etree.ElementTree as ET
|
||||||
|
|
||||||
from UM.Resources import Resources
|
from UM.Resources import Resources
|
||||||
|
@ -369,10 +370,10 @@ class XmlMaterialProfile(InstanceContainer):
|
||||||
self._dirty = False
|
self._dirty = False
|
||||||
self._path = ""
|
self._path = ""
|
||||||
|
|
||||||
def getConfigurationType(self) -> str:
|
def getConfigurationTypeFromSerialized(self, serialized: str) -> Optional[str]:
|
||||||
return "material" # FIXME: not sure if this is correct
|
return "material"
|
||||||
|
|
||||||
def getVersionFromSerialized(self, serialized: str) -> int:
|
def getVersionFromSerialized(self, serialized: str) -> Optional[int]:
|
||||||
version = None
|
version = None
|
||||||
data = ET.fromstring(serialized)
|
data = ET.fromstring(serialized)
|
||||||
metadata = data.iterfind("./um:metadata/*", self.__namespaces)
|
metadata = data.iterfind("./um:metadata/*", self.__namespaces)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue