File tree Expand file tree Collapse file tree 1 file changed +1
-16
lines changed Expand file tree Collapse file tree 1 file changed +1
-16
lines changed Original file line number Diff line number Diff line change 44
55import json
66import warnings
7- from functools import lru_cache
87from pathlib import Path
98from typing import Generator , List , Mapping , Tuple
109
1615from power_grid_model .errors import PowerGridSerializationError
1716from power_grid_model .utils import import_json_data , json_deserialize_from_file
1817
19- from power_grid_model_io .data_types import ExtraInfo , StructuredData
20-
21-
22- @lru_cache ()
23- def load_json_file (file_path : Path ) -> StructuredData :
24- """
25- Load (and cache) a json file
26- Args:
27- file_path: The path to the json file
28-
29- Returns: The parsed contents of the json file in a native python structure
30- """
31- with file_path .open (mode = "r" , encoding = "utf-8" ) as json_file :
32- data = json .load (json_file )
33- return data
18+ from power_grid_model_io .data_types import ExtraInfo
3419
3520
3621def component_objects (json_path : Path ) -> Generator [Tuple [str , List [int ]], None , None ]:
You can’t perform that action at this time.
0 commit comments