interpreter: use typed_pos_args for include_directories

pull/8953/head
Dylan Baker 3 years ago
parent 5aed9dd939
commit 3135b130b8
  1. 7
      mesonbuild/interpreter/interpreter.py

@ -2269,9 +2269,10 @@ This will become a hard error in the future.''' % kwargs['input'], location=self
return result
@permittedKwargs({'is_system'})
@stringArgs
def func_include_directories(self, node, args, kwargs):
return self.build_incdir_object(args, kwargs.get('is_system', False))
@typed_pos_args('include_directories', varargs=str)
def func_include_directories(self, node: mparser.BaseNode, args: T.Tuple[T.List[str]],
kwargs: 'TYPE_kwargs') -> build.IncludeDirs:
return self.build_incdir_object(args[0], kwargs.get('is_system', False))
def build_incdir_object(self, incdir_strings: T.List[str], is_system: bool = False) -> build.IncludeDirs:
if not isinstance(is_system, bool):

Loading…
Cancel
Save