mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
Added some missing typing
This commit is contained in:
parent
5e41443bef
commit
7d3a2c60d4
2 changed files with 5 additions and 6 deletions
|
@ -6,7 +6,7 @@ import io
|
||||||
import json #To parse the product-to-id mapping file.
|
import json #To parse the product-to-id mapping file.
|
||||||
import os.path #To find the product-to-id mapping.
|
import os.path #To find the product-to-id mapping.
|
||||||
import sys
|
import sys
|
||||||
from typing import Any, Dict, List, Optional, Tuple, cast, Set
|
from typing import Any, Dict, List, Optional, Tuple, cast, Set, Union
|
||||||
import xml.etree.ElementTree as ET
|
import xml.etree.ElementTree as ET
|
||||||
|
|
||||||
from UM.Resources import Resources
|
from UM.Resources import Resources
|
||||||
|
@ -837,9 +837,9 @@ class XmlMaterialProfile(InstanceContainer):
|
||||||
ContainerRegistry.getInstance().addContainer(container_to_add)
|
ContainerRegistry.getInstance().addContainer(container_to_add)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def _getSettingsDictForNode(cls, node) -> Tuple[dict, dict]:
|
def _getSettingsDictForNode(cls, node) -> Tuple[Dict[str, Any], Dict[str, Any]]:
|
||||||
node_mapped_settings_dict = dict()
|
node_mapped_settings_dict = dict() # type: Dict[str, Any]
|
||||||
node_unmapped_settings_dict = dict()
|
node_unmapped_settings_dict = dict() # type: Dict[str, Any]
|
||||||
|
|
||||||
# Fetch settings in the "um" namespace
|
# Fetch settings in the "um" namespace
|
||||||
um_settings = node.iterfind("./um:setting", cls.__namespaces)
|
um_settings = node.iterfind("./um:setting", cls.__namespaces)
|
||||||
|
@ -1212,7 +1212,7 @@ class XmlMaterialProfile(InstanceContainer):
|
||||||
"break position": "material_break_retracted_position",
|
"break position": "material_break_retracted_position",
|
||||||
"break speed": "material_break_speed",
|
"break speed": "material_break_speed",
|
||||||
"break temperature": "material_break_temperature"
|
"break temperature": "material_break_temperature"
|
||||||
}
|
} # type: Dict[str, str]
|
||||||
__unmapped_settings = [
|
__unmapped_settings = [
|
||||||
"hardware compatible",
|
"hardware compatible",
|
||||||
"hardware recommended"
|
"hardware recommended"
|
||||||
|
|
|
@ -77,4 +77,3 @@ def test_serializeNonBaseMaterial():
|
||||||
with pytest.raises(NotImplementedError):
|
with pytest.raises(NotImplementedError):
|
||||||
# This material is not a base material, so it can't be serialized!
|
# This material is not a base material, so it can't be serialized!
|
||||||
material_1.serialize()
|
material_1.serialize()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue