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

[ruff] Enable PERF rules and fix all violations (#9874)

This commit is contained in:
J. Nick Koston
2025-07-25 08:15:54 -10:00
committed by GitHub
parent 88ccde4ba1
commit f808c38f10
18 changed files with 90 additions and 96 deletions

View File

@@ -89,9 +89,9 @@ def choose_prompt(options, purpose: str = None):
def choose_upload_log_host(
default, check_default, show_ota, show_mqtt, show_api, purpose: str = None
):
options = []
for port in get_serial_ports():
options.append((f"{port.path} ({port.description})", port.path))
options = [
(f"{port.path} ({port.description})", port.path) for port in get_serial_ports()
]
if default == "SERIAL":
return choose_prompt(options, purpose=purpose)
if (show_ota and "ota" in CORE.config) or (show_api and "api" in CORE.config):