Remove for-else-block from keys.py for readability

This commit is contained in:
xs5871 2023-02-11 09:52:33 +00:00 committed by xs5871
parent 5af52addf8
commit 408f2f487e

View File

@ -448,7 +448,8 @@ class KeyAttrDict:
maybe_key = func(name)
if maybe_key:
break
else:
if not maybe_key:
raise ValueError(f'Invalid key: {name}')
if debug.enabled: