Skip to content

Commit 4ece24a

Browse files
committed
Deprecated Python 3.9 support
1 parent 2b8086e commit 4ece24a

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

vicinity/vicinity.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
from __future__ import annotations
44

5-
import builtins
65
import logging
76
from collections.abc import Iterable, Sequence
87
from pathlib import Path
@@ -189,7 +188,7 @@ def save(
189188

190189
items_dict = {"items": self.items, "metadata": self.metadata, "backend_type": self.backend.backend_type.value}
191190
try:
192-
with builtins.open(path / "data.json", "wb") as file_handle:
191+
with open(path / "data.json", "wb") as file_handle:
193192
file_handle.write(orjson.dumps(items_dict))
194193
except JSONEncodeError as e:
195194
raise JSONEncodeError(f"Items could not be encoded to JSON because they are not serializable: {e}")
@@ -214,7 +213,7 @@ def load(cls, filename: PathLike) -> Vicinity:
214213
"""
215214
folder_path = Path(filename)
216215

217-
with builtins.open(folder_path / "data.json", "rb") as file_handle:
216+
with open(folder_path / "data.json", "rb") as file_handle:
218217
data: dict[str, Any] = orjson.loads(file_handle.read())
219218
items: Sequence[Any] = data["items"]
220219

0 commit comments

Comments
 (0)