Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions mesonbuild/modules/gnome.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@ class GtkDoc(TypedDict):
install_dir: T.List[str]
check: bool
install: bool
gobject_typesfile: T.List[str]
html_assets: T.List[str]
expand_content_files: T.List[str]
gobject_typesfile: T.List[FileOrString]
html_assets: T.List[FileOrString]
expand_content_files: T.List[FileOrString]
c_args: T.List[str]
include_directories: T.List[T.Union[str, build.IncludeDirs]]
dependencies: T.List[T.Union[Dependency, build.SharedLibrary, build.StaticLibrary]]
Expand Down Expand Up @@ -1259,11 +1259,11 @@ def yelp(self, state: 'ModuleState', args: T.Tuple[str, T.List[str]], kwargs: 'Y
'dependencies',
ContainerTypeInfo(list, (Dependency, build.SharedLibrary, build.StaticLibrary)),
listify=True, default=[]),
KwargInfo('expand_content_files', ContainerTypeInfo(list, str), default=[], listify=True),
KwargInfo('expand_content_files', ContainerTypeInfo(list, (str, mesonlib.File)), default=[], listify=True),
KwargInfo('fixxref_args', ContainerTypeInfo(list, str), default=[], listify=True),
KwargInfo('gobject_typesfile', ContainerTypeInfo(list, str), default=[], listify=True),
KwargInfo('gobject_typesfile', ContainerTypeInfo(list, (str, mesonlib.File)), default=[], listify=True),
KwargInfo('html_args', ContainerTypeInfo(list, str), default=[], listify=True),
KwargInfo('html_assets', ContainerTypeInfo(list, str), default=[], listify=True),
KwargInfo('html_assets', ContainerTypeInfo(list, (str, mesonlib.File)), default=[], listify=True),
KwargInfo('ignore_headers', ContainerTypeInfo(list, str), default=[], listify=True),
KwargInfo(
'include_directories',
Expand All @@ -1289,7 +1289,7 @@ def gtkdoc(self, state: 'ModuleState', args: T.Tuple[str], kwargs: 'GtkDoc') ->
main_xml = kwargs['main_xml']
if main_xml is not None:
if main_file is not None:
raise InvalidArguments('gnome.gtkdoc: main_xml and main_xgml are exclusive arguments')
raise InvalidArguments('gnome.gtkdoc: main_xml and main_sgml are exclusive arguments')
main_file = main_xml
moduleversion = kwargs['module_version']
targetname = modulename + ('-' + moduleversion if moduleversion else '') + '-doc'
Expand Down Expand Up @@ -1424,7 +1424,7 @@ def _get_build_args(self, c_args: T.List[str], inc_dirs: T.List[T.Union[str, bui
def gtkdoc_html_dir(self, state: 'ModuleState', args: T.Tuple[str], kwargs: 'TYPE_kwargs') -> str:
return os.path.join('share/gtk-doc/html', args[0])

@typed_pos_args('gnome.gdbus_codegen', str, optargs=[str])
@typed_pos_args('gnome.gdbus_codegen', str, optargs=[(str, mesonlib.File)])
@typed_kwargs(
'gnome.gdbus_codegen',
_BUILD_BY_DEFAULT.evolve(since='0.40.0'),
Expand All @@ -1437,7 +1437,7 @@ def gtkdoc_html_dir(self, state: 'ModuleState', args: T.Tuple[str], kwargs: 'TYP
'annotations', ContainerTypeInfo(list, str),
listify=True,
default=[],
validator=lambda x: 'must be made up of 3 strings for ELEMENT, KEY, and VALUE' if len(x) != 3 else None
validator=lambda x: 'must be made up of 3 strings for ELEMENT, KEY, and VALUE' if len(x) % 3 != 0 else None
),
KwargInfo('install_header', bool, default=False, since='0.46.0'),
KwargInfo('install_dir', (str, NoneType), since='0.46.0'),
Expand All @@ -1446,7 +1446,7 @@ def gtkdoc_html_dir(self, state: 'ModuleState', args: T.Tuple[str], kwargs: 'TYP
'autocleanup', str, default='default', since='0.47.0',
validator=in_set_validator({'all', 'none', 'objects'})),
)
def gdbus_codegen(self, state: 'ModuleState', args: T.Tuple[str, T.Optional[str]],
def gdbus_codegen(self, state: 'ModuleState', args: T.Tuple[str, T.Optional['FileOrString']],
kwargs: 'GdbusCodegen') -> ModuleReturnValue:
namebase = args[0]
xml_files: T.List['FileOrString'] = [args[1]] if args[1] else []
Expand Down