modules/cmake: Use the noPosargs helper
@@ -18,7 +18,7 @@ import shutil
from . import ExtensionModule, ModuleReturnValue
from .. import build, dependencies, mesonlib, mlog
-from ..interpreterbase import permittedKwargs, FeatureNew, stringArgs, InterpreterObject, ObjectHolder
+from ..interpreterbase import permittedKwargs, FeatureNew, stringArgs, InterpreterObject, ObjectHolder, noPosargs
from ..interpreter import ConfigurationDataHolder, InterpreterException, SubprojectHolder
@@ -105,10 +105,9 @@ class CMakeSubprojectHolder(InterpreterObject, ObjectHolder):
info = self._args_to_info(args)
return info['func']
+ @noPosargs
@permittedKwargs({})
def target_list(self, args, kwargs):
- if len(args) > 0:
- raise InterpreterException('target_list does not take any parameters.')
return self.held_object.cm_interpreter.target_list()
class CmakeModule(ExtensionModule):
