mirror of
https://github.com/esphome/esphome.git
synced 2025-07-28 14:16:40 +00:00
Resolve regex library warnings (#8890)
This commit is contained in:
parent
ca0037d076
commit
5921a9cd68
@ -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)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user