Resolve regex library warnings (#8890)

This commit is contained in:
Emmanuel Ferdman 2025-05-26 10:45:47 +03:00 committed by GitHub
parent ca0037d076
commit 5921a9cd68
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -416,7 +416,9 @@ class LineComment(Statement):
self.value = value self.value = value
def __str__(self): def __str__(self):
parts = re.sub(r"\\\s*\n", r"<cont>\n", self.value, re.MULTILINE).split("\n") parts = re.sub(r"\\\s*\n", r"<cont>\n", self.value, flags=re.MULTILINE).split(
"\n"
)
parts = [f"// {x}" for x in parts] parts = [f"// {x}" for x in parts]
return "\n".join(parts) return "\n".join(parts)