mirror of
https://github.com/esphome/esphome.git
synced 2025-09-02 19:32:19 +01:00
Resolve regex library warnings (#8890)
This commit is contained in:
@@ -416,7 +416,9 @@ class LineComment(Statement):
|
||||
self.value = value
|
||||
|
||||
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]
|
||||
return "\n".join(parts)
|
||||
|
||||
|
Reference in New Issue
Block a user