From 2acd22fdb57ecce2d246c6242f845305487694ae Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Tue, 5 Oct 2021 11:24:19 -0700 Subject: [PATCH] modules/gnome: Use typed_pos_args for generate_vapi --- mesonbuild/modules/gnome.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py index 9e6515bb6..bb9ec5727 100644 --- a/mesonbuild/modules/gnome.py +++ b/mesonbuild/modules/gnome.py @@ -1780,14 +1780,9 @@ G_END_DECLS''' @permittedKwargs({'sources', 'packages', 'metadata_dirs', 'gir_dirs', 'vapi_dirs', 'install', 'install_dir'}) - def generate_vapi(self, state: 'ModuleState', args, kwargs) -> ModuleReturnValue: - if len(args) != 1: - raise MesonException('The library name is required') - - if not isinstance(args[0], str): - raise MesonException('The first argument must be the name of the library') + @typed_pos_args('gnome.generate_vapi', str) + def generate_vapi(self, state: 'ModuleState', args: T.Tuple[str], kwargs) -> ModuleReturnValue: created_values = [] - library = args[0] build_dir = os.path.join(state.environment.get_build_dir(), state.subdir) source_dir = os.path.join(state.environment.get_source_dir(), state.subdir)