Files
MoreTore/common/dict_helpers.py
Vehicle Researcher 8a784e5123 openpilot v0.8.13
2022-02-23 16:38:14 -08:00

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