Skip to content

Commit

Permalink
Update upk2esphome/result.py
Browse files Browse the repository at this point in the history
  • Loading branch information
kuba2k2 authored Dec 13, 2023
1 parent 7b053d8 commit 576f56b
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions upk2esphome/result.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,9 @@ def text(self) -> str:
text = re.sub(r"\n([a-z])", r"\n\n\1", text)
text = text.replace("'", '"')
# generate comments for quoted strings with _\d+ keys
text = re.sub(
r'_\d+: "(.+?)"', r"# \1", text
)
text = re.sub(r'_\d+: "(.+?)"', r"# \1", text)
# generate comments for unquoted strings _\d+ keys
text = re.sub(
r"_\d+: (.+?)", r"# \1", text
)
text = re.sub(r"_\d+: (.+?)", r"# \1", text)
text = text.replace(" {}", "")
text = text.replace("{}", "")
return text
Expand Down

0 comments on commit 576f56b

Please sign in to comment.