From 82816936dad9dfeb3235c3c4d9c96e5a4794ee04 Mon Sep 17 00:00:00 2001 From: Simon Kenny Date: Thu, 15 Aug 2024 13:49:17 +0100 Subject: [PATCH] Fix backslash escape pattern usage in setup.py for replacement of template in Modelfile --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index b19837a..01eb447 100644 --- a/setup.py +++ b/setup.py @@ -117,7 +117,7 @@ def writeModelfile(): with open(MODELFILE_GENERATED, 'r') as file: contents = file.read() for key, value in mapper.items(): - contents = re.sub(f"\[{str(key)}\]", value, contents) + contents = re.sub(f"\\[{str(key)}\\]", value, contents) with open(MODELFILE_GENERATED, 'w') as file: file.write(contents)