1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-07 22:02:22 +01:00

[config] Fix reversion of excessive yaml output after error (#10043)

Co-authored-by: J. Nick Koston <nick@koston.org>
This commit is contained in:
Clyde Stubbs
2025-08-03 18:35:52 +10:00
committed by GitHub
parent 296442d8f1
commit b1b0638fab
2 changed files with 82 additions and 0 deletions

View File

@@ -37,6 +37,8 @@ class AnsiStyle(Enum):
def color(col: AnsiFore, msg: str, reset: bool = True) -> str:
if col == AnsiFore.KEEP:
return msg
s = col.value + msg
if reset and col:
s += AnsiStyle.RESET_ALL.value