Skip to content

Commit

Permalink
Use standard dict instead of defaultdict
Browse files Browse the repository at this point in the history
  • Loading branch information
ianmkenney committed Jan 22, 2025
1 parent 7f546d0 commit 4056752
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions alchemiscale/storage/statestore.py
Original file line number Diff line number Diff line change
Expand Up @@ -1238,14 +1238,14 @@ def _node_to_scoped_key(node):
return ScopedKey.from_str(node["_scoped_key"])

transform_function = _node_to_gufe if return_gufe else _node_to_scoped_key
transform_results = defaultdict(None)
transform_results = {}
for record in query_results.records:
node = record_data_to_node(record["th"])
network_scoped_key = record["an"]["_scoped_key"]
transform_results[network_scoped_key] = transform_function(node)

return [
transform_results[str(network_scoped_key)]
transform_results.get(str(network_scoped_key))
for network_scoped_key in network_scoped_keys
]

Expand Down

0 comments on commit 4056752

Please sign in to comment.