From f85f7cfcbbe9c949ba63304add8be7daf5c13e78 Mon Sep 17 00:00:00 2001 From: mmoore Date: Tue, 1 Sep 2026 11:18:30 -0700 Subject: Claude Security Plugin - v0.11.0 --- plugins/claude-security/scripts/lib/strictjson.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins/claude-security/scripts/lib/strictjson.py') diff --git a/plugins/claude-security/scripts/lib/strictjson.py b/plugins/claude-security/scripts/lib/strictjson.py index 2c5a9900..91d4ee30 100644 --- a/plugins/claude-security/scripts/lib/strictjson.py +++ b/plugins/claude-security/scripts/lib/strictjson.py @@ -16,7 +16,7 @@ from collections.abc import Mapping from typing import TYPE_CHECKING, NoReturn, cast if TYPE_CHECKING: - import os + from pathlib import Path from typing import TypeGuard JsonMap = Mapping[str, object] @@ -65,9 +65,9 @@ def _finite(digits: str) -> float: return value -def load(path: str | os.PathLike[str]) -> object: +def load(path: Path) -> object: """The JSON value in `path`; OSError if unreadable, ValueError if not strict JSON.""" - with open(path, encoding="utf-8") as handle: + with path.open(encoding="utf-8") as handle: try: return cast("object", json.load(handle, parse_constant=_refuse, parse_float=_finite)) except RecursionError as error: -- cgit