interpreterobjects: use typed_pos_args and noKwargs for configuration.data.has

pull/9850/head
Dylan Baker 3 years ago committed by Eli Schwartz
parent 1ff2abcd9c
commit 65558445ae
  1. 4
      mesonbuild/interpreter/interpreterobjects.py

@ -348,7 +348,9 @@ class ConfigurationDataObject(MutableInterpreterObject, MesonInterpreterObject):
else:
self.conf_data.values[name] = (0, desc)
def has_method(self, args: T.List[TYPE_var], kwargs: TYPE_kwargs) -> bool:
@typed_pos_args('configuration_data.has', (str, int, bool))
@noKwargs
def has_method(self, args: T.Tuple[T.Union[str, int, bool]], kwargs: TYPE_kwargs) -> bool:
return args[0] in self.conf_data.values
@FeatureNew('configuration_data.get()', '0.38.0')

Loading…
Cancel
Save