pmb.config.init: Simplify removal of select from providers_cfg (MR 2525)

See https://docs.astral.sh/ruff/rules/if-key-in-dict-del
This commit is contained in:
Newbyte 2025-01-10 23:42:06 +01:00 committed by Oliver Smith
parent 7037d9ab46
commit 01abf537bb
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB

View file

@ -355,8 +355,7 @@ def ask_for_provider_select(apkbuild: dict[str, Any], providers_cfg: dict[str, s
# Selecting default means to not select any provider explicitly # Selecting default means to not select any provider explicitly
# In other words, apk chooses it automatically based on # In other words, apk chooses it automatically based on
# "provider_priority" # "provider_priority"
if select in providers_cfg: providers_cfg.pop(select, None)
del providers_cfg[select]
break break
if ret in providers_short: if ret in providers_short:
providers_cfg[select] = providers_short[ret] providers_cfg[select] = providers_short[ret]