diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2021-10-05 11:13:36 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2021-11-01 12:24:25 -0700 |
commit | 58a592c5b08d542b7676d25ad3c7790f87830644 (patch) | |
tree | 97b55e09d9cfae1651d3be54b9b8341dd9545bfc /mesonbuild/modules/gnome.py | |
parent | f339c33394faf7531ce7836e81906db67ebf04ac (diff) | |
download | meson-58a592c5b08d542b7676d25ad3c7790f87830644.zip meson-58a592c5b08d542b7676d25ad3c7790f87830644.tar.gz meson-58a592c5b08d542b7676d25ad3c7790f87830644.tar.bz2 |
modules/gnome: use typed_pos_args for yelp
Diffstat (limited to 'mesonbuild/modules/gnome.py')
-rw-r--r-- | mesonbuild/modules/gnome.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py index 6bb1fbc..f567587 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: |