[core] Enable ruff PTH (flake8-use-pathlib) lint family (#16661)

This commit is contained in:
J. Nick Koston
2026-05-26 05:14:42 +00:00
committed by GitHub
parent ae814cff5c
commit ae74920b81
54 changed files with 162 additions and 155 deletions
+1 -1
View File
@@ -91,7 +91,7 @@ def load_analysis_json(json_path: str) -> dict | None:
return None
try:
with open(json_file, encoding="utf-8") as f:
with Path(json_file).open(encoding="utf-8") as f:
return json.load(f)
except (json.JSONDecodeError, OSError) as e:
print(f"Failed to load analysis JSON: {e}", file=sys.stderr)