interpreter: use typed_pos_args for get_option

pull/8953/head
Dylan Baker 3 years ago
parent 6f6db0f2e3
commit 9f07a1ad41
  1. 7
      mesonbuild/interpreter/interpreter.py

@ -1037,11 +1037,10 @@ external dependencies (including libraries) must go to "dependencies".''')
raise InterpreterException('Tried to access unknown option "%s".' % optname)
@stringArgs
@typed_pos_args('get_option', str)
@noKwargs
def func_get_option(self, nodes, args, kwargs):
if len(args) != 1:
raise InterpreterException('Argument required for get_option.')
def func_get_option(self, nodes: mparser.BaseNode, args: T.Tuple[str],
kwargs: 'TYPE_kwargs') -> T.Union[coredata.UserOption, 'TYPE_var']:
optname = args[0]
if ':' in optname:
raise InterpreterException('Having a colon in option name is forbidden, '

Loading…
Cancel
Save