From 7c757dff71c031ae02ecc358a69a213a5db4051a Mon Sep 17 00:00:00 2001 From: Daniel Mensinger Date: Thu, 17 Jun 2021 00:27:39 +0200 Subject: holders: Fix the remaining code to respect the holder changes --- mesonbuild/ast/interpreter.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'mesonbuild/ast/interpreter.py') diff --git a/mesonbuild/ast/interpreter.py b/mesonbuild/ast/interpreter.py index 26447ce..b9dfc7b 100644 --- a/mesonbuild/ast/interpreter.py +++ b/mesonbuild/ast/interpreter.py @@ -76,6 +76,9 @@ class MockRunTarget(MesonInterpreterObject): ADD_SOURCE = 0 REMOVE_SOURCE = 1 +_T = T.TypeVar('_T') +_V = T.TypeVar('_V') + class AstInterpreter(InterpreterBase): def __init__(self, source_root: str, subdir: str, subproject: str, visitors: T.Optional[T.List[AstVisitor]] = None): super().__init__(source_root, subdir, subproject) @@ -141,6 +144,12 @@ class AstInterpreter(InterpreterBase): 'range': self.func_do_nothing, }) + def _unholder_args(self, args: _T, kwargs: _V) -> T.Tuple[_T, _V]: + return args, kwargs + + def _holderify(self, res: _T) -> _T: + return res + def func_do_nothing(self, node: BaseNode, args: T.List[TYPE_nvar], kwargs: T.Dict[str, TYPE_nvar]) -> bool: return True -- cgit v1.1