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 return result
@permittedKwargs({'is_system'}) @permittedKwargs({'is_system'})
@stringArgs @typed_pos_args('include_directories', varargs=str)
def func_include_directories(self, node, args, kwargs): def func_include_directories(self, node: mparser.BaseNode, args: T.Tuple[T.List[str]],
return self.build_incdir_object(args, kwargs.get('is_system', False)) 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: def build_incdir_object(self, incdir_strings: T.List[str], is_system: bool = False) -> build.IncludeDirs:
if not isinstance(is_system, bool): if not isinstance(is_system, bool):

Loading…
Cancel
Save