From a5ced58289865eee10ea1e3453f5f61e31b4e18b Mon Sep 17 00:00:00 2001 From: Jeffrey Phillips Freeman Date: Tue, 24 Mar 2026 15:22:30 +0000 Subject: [PATCH] fix: rename cls to klass in _validate_protocol staticmethod for pyright compliance --- .../infrastructure/sandbox/strategy_registry.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cleveragents/infrastructure/sandbox/strategy_registry.py b/src/cleveragents/infrastructure/sandbox/strategy_registry.py index 04c8c68d..5d7335f7 100644 --- a/src/cleveragents/infrastructure/sandbox/strategy_registry.py +++ b/src/cleveragents/infrastructure/sandbox/strategy_registry.py @@ -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)}" )