Remove for-else-block from keys.py for readability
This commit is contained in:
parent
5af52addf8
commit
408f2f487e
@ -448,7 +448,8 @@ class KeyAttrDict:
|
|||||||
maybe_key = func(name)
|
maybe_key = func(name)
|
||||||
if maybe_key:
|
if maybe_key:
|
||||||
break
|
break
|
||||||
else:
|
|
||||||
|
if not maybe_key:
|
||||||
raise ValueError(f'Invalid key: {name}')
|
raise ValueError(f'Invalid key: {name}')
|
||||||
|
|
||||||
if debug.enabled:
|
if debug.enabled:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user