mirror of
https://github.com/esphome/esphome.git
synced 2025-09-07 13:52:20 +01:00
[ruff] Enable SIM rules and fix code simplification violations (#9872)
This commit is contained in:
@@ -61,7 +61,7 @@ class ESPHomeLogFormatter(logging.Formatter):
|
||||
}.get(record.levelname, "")
|
||||
message = f"{prefix}{formatted}{AnsiStyle.RESET_ALL.value}"
|
||||
if CORE.dashboard:
|
||||
try:
|
||||
try: # noqa: SIM105
|
||||
message = message.replace("\033", "\\033")
|
||||
except UnicodeEncodeError:
|
||||
pass
|
||||
|
Reference in New Issue
Block a user