We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ba09866 commit 9231f42Copy full SHA for 9231f42
preprocess_schemas.py
@@ -22,13 +22,13 @@
22
23
def load_json(path):
24
"""Loads JSON data from a file."""
25
- with open(path, "r", encoding="utf-8") as f:
+ with Path(path).open(encoding="utf-8") as f:
26
return json.load(f)
27
28
29
def save_json(data, path):
30
"""Saves data to a JSON file with standard indentation."""
31
- with open(path, "w", encoding="utf-8") as f:
+ with Path(path).open("w", encoding="utf-8") as f:
32
json.dump(data, f, indent=2)
33
34
0 commit comments