modules/gnome: use typed_pos_args for gtkdoc
This commit is contained in:
parent
58a592c5b0
commit
256d5a71ba
|
@ -1075,12 +1075,9 @@ class GnomeModule(ExtensionModule):
|
||||||
'mkdb_args', 'ignore_headers', 'include_directories',
|
'mkdb_args', 'ignore_headers', 'include_directories',
|
||||||
'namespace', 'mode', 'expand_content_files', 'module_version',
|
'namespace', 'mode', 'expand_content_files', 'module_version',
|
||||||
'c_args', 'check'})
|
'c_args', 'check'})
|
||||||
def gtkdoc(self, state, args, kwargs):
|
@typed_pos_args('gnome.gtkdok', str)
|
||||||
if len(args) != 1:
|
def gtkdoc(self, state: 'ModuleState', args: T.Tuple[str], kwargs):
|
||||||
raise MesonException('Gtkdoc must have one positional argument.')
|
|
||||||
modulename = args[0]
|
modulename = args[0]
|
||||||
if not isinstance(modulename, str):
|
|
||||||
raise MesonException('Gtkdoc arg must be string.')
|
|
||||||
if 'src_dir' not in kwargs:
|
if 'src_dir' not in kwargs:
|
||||||
raise MesonException('Keyword argument src_dir missing.')
|
raise MesonException('Keyword argument src_dir missing.')
|
||||||
main_file = kwargs.get('main_sgml', '')
|
main_file = kwargs.get('main_sgml', '')
|
||||||
|
|
Loading…
Reference in New Issue