mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-07 05:53:59 -06: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
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue