mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-06-20 05:22:03 +08:00
eff388b1b6
date: 2023-07-27T18:38:32
master commit: fa310d9e25
10 lines
259 B
Python
10 lines
259 B
Python
# remove all keys that end in DEPRECATED
|
|
def strip_deprecated_keys(d):
|
|
for k in list(d.keys()):
|
|
if isinstance(k, str):
|
|
if k.endswith('DEPRECATED'):
|
|
d.pop(k)
|
|
elif isinstance(d[k], dict):
|
|
strip_deprecated_keys(d[k])
|
|
return d
|