7d7f0054e5
date: 2024-02-21T23:02:42 master commit: 0b4d08fab8e35a264bc7383e878538f8083c33e5
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
|