summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2025-05-05 17:55:40 +0200
committerDylan Baker <dylan@pnwbakers.com>2025-05-07 09:43:43 -0700
commit3a020bbd65270a69ca45a7102a4d67de5ac5ae03 (patch)
tree410ba428fe65def05fa0b6ef5810b9948c6d0e38
parent614aa835ed1e28ebe9ab96f4ea79ae83bc12a249 (diff)
downloadmeson-3a020bbd65270a69ca45a7102a4d67de5ac5ae03.tar.gz
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 <pbonzini@redhat.com>
-rw-r--r--mesonbuild/interpreterbase/decorators.py2
1 files changed, 1 insertions, 1 deletions
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.