feat: add function for cleaning dicts

This commit is contained in:
Herculino Trotta
2024-11-17 01:24:07 -03:00
parent 8a6aa50f79
commit b979728405

View File

@@ -0,0 +1,2 @@
def remove_falsey_entries(data: dict, key: str) -> dict:
return {k: v for k, v in data.items() if v.get(key)}