From 648999e32b5260945b7c7f141feb076472fba82f Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 8 Aug 2019 09:46:04 +0200 Subject: [PATCH] Use regex literal instead of normal literal for regex Hopefully this fixes the deprecation warning in newer Python versions. Contributes to issue #6114. --- cura/Settings/CuraContainerRegistry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura/Settings/CuraContainerRegistry.py b/cura/Settings/CuraContainerRegistry.py index d8495e268a..bc0d99ead9 100644 --- a/cura/Settings/CuraContainerRegistry.py +++ b/cura/Settings/CuraContainerRegistry.py @@ -75,7 +75,7 @@ class CuraContainerRegistry(ContainerRegistry): # \return \type{string} Name that is unique for the specified type and name/id def createUniqueName(self, container_type: str, current_name: str, new_name: str, fallback_name: str) -> str: new_name = new_name.strip() - num_check = re.compile("(.*?)\s*#\d+$").match(new_name) + num_check = re.compile(r"(.*?)\s*#\d+$").match(new_name) if num_check: new_name = num_check.group(1) if new_name == "":