chore: clean up cfg abbreviation and stale TODO link

Rename `cfg` parameter/local in resolve_mqtt_password to `config`
for PEP 8 compliance. Drop the broken reference to the long-removed
docs/plans/device-typed-configs.md from TODO.md.
This commit is contained in:
2026-05-10 23:19:15 +03:00
parent 6a07a6b1a2
commit e65dcb41f4
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -100,7 +100,7 @@ class MQTTConfig(BaseSettings):
base_topic: str = "ledgrab"
def resolve_mqtt_password(cfg: "Config | None" = None) -> str:
def resolve_mqtt_password(config: "Config | None" = None) -> str:
"""Return the plaintext MQTT password.
Accepts either an ``ENC:v1:`` envelope or legacy plaintext. If
@@ -110,8 +110,8 @@ def resolve_mqtt_password(cfg: "Config | None" = None) -> str:
from ledgrab.utils import get_logger, secret_box
log = get_logger(__name__)
cfg = cfg or get_config()
pw = cfg.mqtt.password or ""
config = config or get_config()
pw = config.mqtt.password or ""
if not pw:
return ""
if secret_box.is_encrypted(pw):