adapters/simulation/grid.py stores action handlers in a class-level dict _action_handlers: dict[ActionType, object] containing the raw unbound method functions, invoked via handler(self, action). This works and is covered by tests, but the object typing defeats type checking on the call, and ruff flags it (RUF012 mutable-class-default).
Suggested fix: build the handler map in init binding the methods ({ActionType.MOVE: self._handle_move, ...}) with a typed Callable[[Action], ActionResult] signature, or annotate as ClassVar. This restores type safety and removes the lint violation.
adapters/simulation/grid.py stores action handlers in a class-level dict
_action_handlers: dict[ActionType, object]containing the raw unbound method functions, invoked viahandler(self, action). This works and is covered by tests, but theobjecttyping defeats type checking on the call, and ruff flags it (RUF012 mutable-class-default).Suggested fix: build the handler map in init binding the methods (
{ActionType.MOVE: self._handle_move, ...}) with a typedCallable[[Action], ActionResult]signature, or annotate as ClassVar. This restores type safety and removes the lint violation.