aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2021-12-06 14:11:51 -0800
committerEli Schwartz <eschwartz93@gmail.com>2022-01-18 17:53:29 -0500
commit7537ec32994117f6e1b409be368097505dd340e2 (patch)
treeda0dde01b4fc59070f5a64a4365c074290e208f7 /mesonbuild
parent0fa343664519fc903d45f4e67da2e8a657011daf (diff)
downloadmeson-7537ec32994117f6e1b409be368097505dd340e2.zip
meson-7537ec32994117f6e1b409be368097505dd340e2.tar.gz
meson-7537ec32994117f6e1b409be368097505dd340e2.tar.bz2
interpreterobjects: use typed_pos_args for dependency.get_configtool_variable
Diffstat (limited to 'mesonbuild')
-rw-r--r--mesonbuild/interpreter/interpreterobjects.py11
1 files changed, 3 insertions, 8 deletions
diff --git a/mesonbuild/interpreter/interpreterobjects.py b/mesonbuild/interpreter/interpreterobjects.py
index 9f5851b..7ac5c42 100644
--- a/mesonbuild/interpreter/interpreterobjects.py
+++ b/mesonbuild/interpreter/interpreterobjects.py
@@ -477,14 +477,9 @@ class DependencyHolder(ObjectHolder[Dependency]):
@FeatureDeprecated('dependency.get_configtool_variable', '0.56.0',
'use dependency.get_variable(configtool : ...) instead')
@noKwargs
- def configtool_method(self, args: T.List[TYPE_var], kwargs: TYPE_kwargs) -> str:
- args = listify(args)
- if len(args) != 1:
- raise InterpreterException('get_configtool_variable takes exactly one argument.')
- varname = args[0]
- if not isinstance(varname, str):
- raise InterpreterException('Variable name must be a string.')
- return self.held_object.get_configtool_variable(varname)
+ @typed_pos_args('dependency.get_config_tool_variable', str)
+ def configtool_method(self, args: T.Tuple[str], kwargs: TYPE_kwargs) -> str:
+ return self.held_object.get_configtool_variable(args[0])
@FeatureNew('dependency.partial_dependency', '0.46.0')
@noPosargs