diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2021-10-05 11:24:19 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2021-11-01 12:24:25 -0700 |
commit | 2acd22fdb57ecce2d246c6242f845305487694ae (patch) | |
tree | efb034ebf89d01ae9d1c471f71377c701b08ee78 /mesonbuild/modules/gnome.py | |
parent | bfd47cdac6b9aa540d55390a3d4b38aac6815e72 (diff) | |
download | meson-2acd22fdb57ecce2d246c6242f845305487694ae.zip meson-2acd22fdb57ecce2d246c6242f845305487694ae.tar.gz meson-2acd22fdb57ecce2d246c6242f845305487694ae.tar.bz2 |
modules/gnome: Use typed_pos_args for generate_vapi
Diffstat (limited to 'mesonbuild/modules/gnome.py')
-rw-r--r-- | mesonbuild/modules/gnome.py | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py index 9e6515b..bb9ec57 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) |