diff --git a/cmk/gui/hooks.py b/cmk/gui/hooks.py index 659a96f8852..0a6ef00053a 100644 --- a/cmk/gui/hooks.py +++ b/cmk/gui/hooks.py @@ -118,7 +118,7 @@ def call(name: str, *args: Any) -> None: def scoped_memoize( clear_events: ClearEvents, - cache_impl: Callable[CacheWrapperArgs, Callable[P, R]], + cache_impl: Callable[CacheWrapperArgs, Callable[[Callable[P, R]], Callable[P, R]]], cache_impl_args: CacheWrapperArgs.args, cache_impl_kwargs: CacheWrapperArgs.kwargs, ) -> Callable[[Callable[P, R]], Callable[P, R]]: @@ -155,7 +155,7 @@ def scoped_memoize( if not clear_events: raise ValueError(f"No clear-events specified. Use one of: {ClearEvent!r}") - def _decorator(func: P.args) -> P.args: + def _decorator(func: Callable[P, R]) -> Callable[P, R]: cached_func = cache_impl(*cache_impl_args, **cache_impl_kwargs)(func) for clear_event in clear_events: # Tried to generically type this such that parameters and added methods are checked,