mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Applied code-review comments
Contributes to CURA-10988
This commit is contained in:
parent
5693577f60
commit
6ecb1c6b79
1 changed files with 3 additions and 5 deletions
|
@ -25,11 +25,9 @@ class VersionUpgrade54to55(VersionUpgrade):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _isBrandedMaterialID(material_id):
|
def _isBrandedMaterialID(material_id: str) -> bool:
|
||||||
return material_id.startswith("ultimaker_")
|
return material_id.startswith("ultimaker_")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def upgradeStack(serialized: str, filename: str) -> Tuple[List[str], List[str]]:
|
def upgradeStack(serialized: str, filename: str) -> Tuple[List[str], List[str]]:
|
||||||
"""
|
"""
|
||||||
|
@ -57,11 +55,11 @@ class VersionUpgrade54to55(VersionUpgrade):
|
||||||
# We have an Ultimaker branded material ID, so we should change the intent & quality!
|
# We have an Ultimaker branded material ID, so we should change the intent & quality!
|
||||||
|
|
||||||
quality_id = VersionUpgrade54to55.profile_regex.sub(
|
quality_id = VersionUpgrade54to55.profile_regex.sub(
|
||||||
"um_\g<machine>_\g<core_type>\g<nozzle_size>_um-\g<material>_\g<layer_height>", quality_id)
|
r"um_\g<machine>_\g<core_type>\g<nozzle_size>_um-\g<material>_\g<layer_height>", quality_id)
|
||||||
|
|
||||||
|
|
||||||
intent_id = VersionUpgrade54to55.profile_regex.sub(
|
intent_id = VersionUpgrade54to55.profile_regex.sub(
|
||||||
"um_\g<machine>_\g<core_type>\g<nozzle_size>_um-\g<material>_\g<layer_height>", intent_id)
|
r"um_\g<machine>_\g<core_type>\g<nozzle_size>_um-\g<material>_\g<layer_height>", intent_id)
|
||||||
|
|
||||||
parser["containers"]["3"] = quality_id
|
parser["containers"]["3"] = quality_id
|
||||||
parser["containers"]["2"] = intent_id
|
parser["containers"]["2"] = intent_id
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue