File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33from __future__ import annotations
44
5- import builtins
65import logging
76from collections .abc import Iterable , Sequence
87from 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
You can’t perform that action at this time.
0 commit comments