From 58a592c5b08d542b7676d25ad3c7790f87830644 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Tue, 5 Oct 2021 11:13:36 -0700 Subject: [PATCH] modules/gnome: use typed_pos_args for yelp --- mesonbuild/modules/gnome.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py index 6bb1fbc12..f567587d7 100644 --- a/mesonbuild/modules/gnome.py +++ b/mesonbuild/modules/gnome.py @@ -1001,18 +1001,15 @@ class GnomeModule(ExtensionModule): @permittedKwargs({'sources', 'media', 'symlink_media', 'languages'}) @FeatureDeprecatedKwargs('gnome.yelp', '0.43.0', ['languages'], 'Use a LINGUAS file in the source directory instead') - def yelp(self, state, args, kwargs): - if len(args) < 1: - raise MesonException('Yelp requires a project id') - + @typed_pos_args('gnome.yelp', str, varargs=str) + def yelp(self, state: 'ModuleState', args: T.Tuple[str, T.List[str]], kwargs) -> ModuleReturnValue: project_id = args[0] if len(args) > 1: FeatureDeprecated.single_use('gnome.yelp more than one positional argument', '0.60.0', 'use the "sources" keyword argument instead.') sources = mesonlib.stringlistify(kwargs.pop('sources', [])) if not sources: - if len(args) > 1: - sources = mesonlib.stringlistify(args[1:]) + sources = args[1] if not sources: raise MesonException('Yelp requires a list of sources') else: