From 6ecb1c6b79d7607e6b9c4f1bd8d37ba1f0385e24 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 12 Sep 2023 16:46:54 +0200 Subject: [PATCH] Applied code-review comments Contributes to CURA-10988 --- .../VersionUpgrade54to55/VersionUpgrade54to55.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/plugins/VersionUpgrade/VersionUpgrade54to55/VersionUpgrade54to55.py b/plugins/VersionUpgrade/VersionUpgrade54to55/VersionUpgrade54to55.py index d1a85d49bd..e5a79e74af 100644 --- a/plugins/VersionUpgrade/VersionUpgrade54to55/VersionUpgrade54to55.py +++ b/plugins/VersionUpgrade/VersionUpgrade54to55/VersionUpgrade54to55.py @@ -25,11 +25,9 @@ class VersionUpgrade54to55(VersionUpgrade): return False @staticmethod - def _isBrandedMaterialID(material_id): + def _isBrandedMaterialID(material_id: str) -> bool: return material_id.startswith("ultimaker_") - - @staticmethod 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! quality_id = VersionUpgrade54to55.profile_regex.sub( - "um_\g_\g\g_um-\g_\g", quality_id) + r"um_\g_\g\g_um-\g_\g", quality_id) intent_id = VersionUpgrade54to55.profile_regex.sub( - "um_\g_\g\g_um-\g_\g", intent_id) + r"um_\g_\g\g_um-\g_\g", intent_id) parser["containers"]["3"] = quality_id parser["containers"]["2"] = intent_id