Skip to content

Commit

Permalink
Merge pull request #1021 from rkingsbury/patch
Browse files Browse the repository at this point in the history
Set explicit mode in zopen to address monty FutureWarning
  • Loading branch information
rkingsbury authored Dec 29, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2 parents 00537d7 + 2d6fbb2 commit 1e382c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/maggma/stores/mongolike.py
Original file line number Diff line number Diff line change
@@ -711,7 +711,7 @@ def read_json_file(self, path) -> list:
Args:
path: Path to the JSON file to be read
"""
with zopen(path) as f:
with zopen(path, "r") as f:
data = f.read()
data = data.decode() if isinstance(data, bytes) else data
objects = bson.json_util.loads(data) if "$oid" in data else orjson.loads(data)

0 comments on commit 1e382c0

Please sign in to comment.