diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2021-12-06 14:46:52 -0800 |
---|---|---|
committer | Eli Schwartz <eschwartz93@gmail.com> | 2022-01-18 17:53:29 -0500 |
commit | 65558445aee30517f8abe94dadcd3ab57dddf56a (patch) | |
tree | 722310c44c697046abe536907e2ec596c9eef682 /mesonbuild/interpreter | |
parent | 1ff2abcd9c84b9fd772da541bcf9c8cf580aea17 (diff) | |
download | meson-65558445aee30517f8abe94dadcd3ab57dddf56a.zip meson-65558445aee30517f8abe94dadcd3ab57dddf56a.tar.gz meson-65558445aee30517f8abe94dadcd3ab57dddf56a.tar.bz2 |
interpreterobjects: use typed_pos_args and noKwargs for configuration.data.has
Diffstat (limited to 'mesonbuild/interpreter')
-rw-r--r-- | mesonbuild/interpreter/interpreterobjects.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mesonbuild/interpreter/interpreterobjects.py b/mesonbuild/interpreter/interpreterobjects.py index 96b5e13..ef55f24 100644 --- a/mesonbuild/interpreter/interpreterobjects.py +++ b/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') |