mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-06-30 11:02:19 +08:00
6d316f2bc7
date: 2024-06-11T01:36:39 master commit: f8cb04e4a8b032b72a909f68b808a50936184bee
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
|