Skip to content

Commit 9231f42

Browse files
committed
style: replace builtin open with pathlib.Path.open to resolve PTH123
1 parent ba09866 commit 9231f42

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

preprocess_schemas.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@
2222

2323
def load_json(path):
2424
"""Loads JSON data from a file."""
25-
with open(path, "r", encoding="utf-8") as f:
25+
with Path(path).open(encoding="utf-8") as f:
2626
return json.load(f)
2727

2828

2929
def save_json(data, path):
3030
"""Saves data to a JSON file with standard indentation."""
31-
with open(path, "w", encoding="utf-8") as f:
31+
with Path(path).open("w", encoding="utf-8") as f:
3232
json.dump(data, f, indent=2)
3333

3434

0 commit comments

Comments
 (0)