From 5face7170fe4e82ed3d011094d9a05902ec74214 Mon Sep 17 00:00:00 2001 From: Bruno Postle Date: Tue, 28 Nov 2023 22:51:58 +0000 Subject: [PATCH] Fix python 3.12 SyntaxWarning (#4045) Regular expressions now need to be double-escaped: https://docs.python.org/3/whatsnew/3.12.html#other-language-changes --- src/blenderbim/blenderbim/tool/ifcgit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/blenderbim/blenderbim/tool/ifcgit.py b/src/blenderbim/blenderbim/tool/ifcgit.py index a09ab5ad1b..df8553c4a3 100644 --- a/src/blenderbim/blenderbim/tool/ifcgit.py +++ b/src/blenderbim/blenderbim/tool/ifcgit.py @@ -34,7 +34,7 @@ class IfcGit: working_dir = repo.working_dir for item in os.listdir(working_dir): path = os.path.join(working_dir, item) - if os.path.isfile(path) and re.match(".*\.ifc$", path, re.IGNORECASE): + if os.path.isfile(path) and re.match(".*\\.ifc$", path, re.IGNORECASE): cls.load_project(path) return True return False @@ -202,7 +202,7 @@ class IfcGit: """Check a bare branch or tag name is valid""" return re.match( - "^(?!\.| |-|/)((?!\.\.)(?!.*/\.)(/\*|/\*/)*(?!@\{)[^\~\:\^\\\ \?*\[])+(?