From 256d5a71badf05c9c784ba493d8a9cf8e33c69db Mon Sep 17 00:00:00 2001
From: Dylan Baker <dylan@pnwbakers.com>
Date: Tue, 5 Oct 2021 11:14:29 -0700
Subject: modules/gnome: use typed_pos_args for gtkdoc

---
 mesonbuild/modules/gnome.py | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

(limited to 'mesonbuild/modules/gnome.py')

diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
index f567587..417010e 100644
--- a/mesonbuild/modules/gnome.py
+++ b/mesonbuild/modules/gnome.py
@@ -1075,12 +1075,9 @@ class GnomeModule(ExtensionModule):
                       'mkdb_args', 'ignore_headers', 'include_directories',
                       'namespace', 'mode', 'expand_content_files', 'module_version',
                       'c_args', 'check'})
-    def gtkdoc(self, state, args, kwargs):
-        if len(args) != 1:
-            raise MesonException('Gtkdoc must have one positional argument.')
+    @typed_pos_args('gnome.gtkdok', str)
+    def gtkdoc(self, state: 'ModuleState', args: T.Tuple[str], kwargs):
         modulename = args[0]
-        if not isinstance(modulename, str):
-            raise MesonException('Gtkdoc arg must be string.')
         if 'src_dir' not in kwargs:
             raise MesonException('Keyword argument src_dir missing.')
         main_file = kwargs.get('main_sgml', '')
-- 
cgit v1.1