3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-07 09:55:20 +00:00

smt2: py3.12+: avoid SyntaxWarning.

Python 3.12 emits a SyntaxWarning when encountering invalid escape
sequences.  They still parse as expected.  Marking these raw produces
the same result without the warnings.
This commit is contained in:
Charlotte 2023-06-23 14:38:15 +10:00
parent f9257d3192
commit 3f29bdbbc5

View file

@ -768,7 +768,7 @@ class SmtIo:
if self.timeinfo:
i = 0
s = "/-\|"
s = r"/-\|"
count = 0
num_bs = 0
@ -1171,7 +1171,7 @@ class MkVcd:
def escape_name(self, name):
name = re.sub(r"\[([0-9a-zA-Z_]*[a-zA-Z_][0-9a-zA-Z_]*)\]", r"<\1>", name)
if re.match("[\[\]]", name) and name[0] != "\\":
if re.match(r"[\[\]]", name) and name[0] != "\\":
name = "\\" + name
return name