From cd921eafc4cd0ba9aaeb8efa4103a387f2fdc3a9 Mon Sep 17 00:00:00 2001 From: Andriy Kurilin Date: Sat, 9 Aug 2025 18:30:21 +0200 Subject: [PATCH] [type-hints] Set config of context and hooks as Any The target plugin should set desired type itself. Change-Id: I66ddc89b8a4663aab57e9fd16d5d5ed7a95d0e26 Signed-off-by: Andriy Kurilin --- rally/task/context.py | 1 + rally/task/hook.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/rally/task/context.py b/rally/task/context.py index 1d0a2116ff..891d159fe7 100644 --- a/rally/task/context.py +++ b/rally/task/context.py @@ -125,6 +125,7 @@ class BaseContext(plugin.Plugin, functional.FunctionalMixin, RESOURCE_NAME_FORMAT = "c_rally_XXXXXXXX_XXXXXXXX" CONFIG_SCHEMA: dict[str, t.Any] = {"type": "null"} + config: t.Any def __init__(self, ctx: dict[str, t.Any]) -> None: super(BaseContext, self).__init__() diff --git a/rally/task/hook.py b/rally/task/hook.py index 1cc54e1fa9..30944dbe86 100644 --- a/rally/task/hook.py +++ b/rally/task/hook.py @@ -141,7 +141,7 @@ class HookAction(plugin.Plugin, validation.ValidatablePluginMixin, metaclass=abc.ABCMeta): """Factory for hook classes.""" - CONFIG_SCHEMA = {"type": "null"} + CONFIG_SCHEMA: dict = {"type": "null"} def __init__( self,