Skip to content

Commit

Permalink
Check for MutableMapping, not dict in utils (#1706)
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew-S-Rosen authored Feb 15, 2024
1 parent cfcf88c commit 9c9eb1e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/quacc/utils/dicts.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def remove_dict_entries(
Cleaned dictionary
"""

if isinstance(start_dict, dict):
if isinstance(start_dict, MutableMapping):
return {
k: remove_dict_entries(v, remove_trigger)
for k, v in start_dict.items()
Expand Down Expand Up @@ -165,7 +165,7 @@ def sort_dict(start_dict: dict[str, Any]) -> dict[str, Any]:
"""

return {
k: sort_dict(v) if isinstance(v, dict) else v
k: sort_dict(v) if isinstance(v, MutableMapping) else v
for k, v in sorted(start_dict.items())
}

Expand Down

0 comments on commit 9c9eb1e

Please sign in to comment.