From 3a020bbd65270a69ca45a7102a4d67de5ac5ae03 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Mon, 5 May 2025 17:55:40 +0200 Subject: interpreterbase: allow any return type for convertors A convertor will *accept* something that is definitely a TYPE_var; but the output can be any Python object that the evaluation function desires. Signed-off-by: Paolo Bonzini --- mesonbuild/interpreterbase/decorators.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mesonbuild/interpreterbase/decorators.py b/mesonbuild/interpreterbase/decorators.py index 06cac526d..a847689b7 100644 --- a/mesonbuild/interpreterbase/decorators.py +++ b/mesonbuild/interpreterbase/decorators.py @@ -393,7 +393,7 @@ class KwargInfo(T.Generic[_T]): deprecated_message: T.Union[str, None, _NULL_T] = _NULL, deprecated_values: T.Union[T.Dict[T.Union[_T, ContainerTypeInfo, type], T.Union[str, T.Tuple[str, str]]], None, _NULL_T] = _NULL, validator: T.Union[T.Callable[[_T], T.Optional[str]], None, _NULL_T] = _NULL, - convertor: T.Union[T.Callable[[_T], TYPE_var], None, _NULL_T] = _NULL) -> 'KwargInfo': + convertor: T.Union[T.Callable[[_T], object], None, _NULL_T] = _NULL) -> 'KwargInfo': """Create a shallow copy of this KwargInfo, with modifications. This allows us to create a new copy of a KwargInfo with modifications. -- cgit v1.2.3