mirror of
https://github.com/esphome/esphome.git
synced 2025-09-08 22:32:21 +01:00
preen
This commit is contained in:
@@ -341,7 +341,7 @@ def check_permissions(port):
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def upload_program(config, args, host):
|
def upload_program(config, args, host: str):
|
||||||
try:
|
try:
|
||||||
module = importlib.import_module("esphome.components." + CORE.target_platform)
|
module = importlib.import_module("esphome.components." + CORE.target_platform)
|
||||||
if getattr(module, "upload_program")(config, args, host):
|
if getattr(module, "upload_program")(config, args, host):
|
||||||
@@ -381,7 +381,7 @@ def upload_program(config, args, host):
|
|||||||
|
|
||||||
# Check if we should use MQTT for address resolution
|
# Check if we should use MQTT for address resolution
|
||||||
# This happens when no device was specified, or the current host is "MQTT"/"OTA"
|
# This happens when no device was specified, or the current host is "MQTT"/"OTA"
|
||||||
devices = args.device or []
|
devices: list[str] = args.device or []
|
||||||
if (
|
if (
|
||||||
CONF_MQTT in config # pylint: disable=too-many-boolean-expressions
|
CONF_MQTT in config # pylint: disable=too-many-boolean-expressions
|
||||||
and (not devices or host in ("MQTT", "OTA"))
|
and (not devices or host in ("MQTT", "OTA"))
|
||||||
@@ -486,7 +486,7 @@ def command_compile(args, config):
|
|||||||
|
|
||||||
|
|
||||||
def command_upload(args, config) -> int:
|
def command_upload(args, config) -> int:
|
||||||
devices = args.device or []
|
devices: list[str] = args.device or []
|
||||||
if not devices:
|
if not devices:
|
||||||
# No devices specified, use the interactive chooser
|
# No devices specified, use the interactive chooser
|
||||||
devices = [
|
devices = [
|
||||||
|
Reference in New Issue
Block a user