fix: rename cls to klass in _validate_protocol staticmethod for pyright compliance
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 25s
CI / lint (pull_request) Successful in 3m32s
CI / typecheck (pull_request) Successful in 3m59s
CI / quality (pull_request) Successful in 4m1s
CI / security (pull_request) Successful in 4m8s
CI / unit_tests (pull_request) Successful in 6m34s
CI / integration_tests (pull_request) Successful in 8m8s
CI / docker (pull_request) Successful in 1m22s
CI / e2e_tests (pull_request) Successful in 10m45s
CI / coverage (pull_request) Successful in 10m4s
CI / status-check (pull_request) Successful in 1s
CI / benchmark-regression (pull_request) Successful in 54m59s

This commit is contained in:
2026-03-24 15:28:17 +00:00
parent 8e9aa7af48
commit c9be72a99f
@@ -259,14 +259,14 @@ class SandboxStrategyRegistry:
# ------------------------------------------------------------------
@staticmethod
def _validate_protocol(cls: type[Any]) -> None:
def _validate_protocol(klass: type[Any]) -> None:
"""Validate that a class satisfies :class:`SandboxStrategyProtocol`.
Uses structural subtyping: checks that all 9 required methods
are present as callable attributes on the class.
Args:
cls: The class to validate.
klass: The class to validate.
Raises:
ProtocolMismatchError: If the class is missing required methods.
@@ -286,12 +286,12 @@ class SandboxStrategyRegistry:
missing = [
method
for method in required_methods
if not callable(getattr(cls, method, None))
if not callable(getattr(klass, method, None))
]
if missing:
msg = (
f"Class '{cls.__name__}' does not satisfy "
f"Class '{klass.__name__}' does not satisfy "
f"SandboxStrategyProtocol. Missing methods: "
f"{', '.join(missing)}"
)