mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-06-30 00:55:12 +08:00
Use regex literal instead of normal literal for regex
Hopefully this fixes the deprecation warning in newer Python versions. Contributes to issue #6114.
This commit is contained in:
parent
2d4fd5649d
commit
648999e32b
@ -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 == "":
|
||||
|
Loading…
x
Reference in New Issue
Block a user