diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2021-12-12 00:16:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-12 00:16:37 +0200 |
commit | 076618260001783235b1a34eb52c6e067ac83be8 (patch) | |
tree | d6dba631adfecb034e9eee013b05955702f2d764 | |
parent | 05d61b4c66ae87185087db114cde964823e9b603 (diff) | |
parent | 21c3ee3ee751b99c270a4a524d4cee66b25453c0 (diff) | |
download | meson-076618260001783235b1a34eb52c6e067ac83be8.zip meson-076618260001783235b1a34eb52c6e067ac83be8.tar.gz meson-076618260001783235b1a34eb52c6e067ac83be8.tar.bz2 |
Merge pull request #9711 from dcbaker/submit/fix-gnome-typing-regressions
Fix regressions caused by typing changes
-rw-r--r-- | mesonbuild/modules/gnome.py | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py index 2194578..326f56b 100644 --- a/mesonbuild/modules/gnome.py +++ b/mesonbuild/modules/gnome.py @@ -148,13 +148,13 @@ if T.TYPE_CHECKING: extra_args: T.List[str] install_dir: T.List[T.Union[str, bool]] install_header: bool - internal: T.Optional[str] - nostdinc: T.Optional[str] + internal: bool + nostdinc: bool prefix: T.Optional[str] - skip_source: T.Optional[str] + skip_source: bool sources: T.List[str] - stdinc: T.Optional[str] - valist_marshallers: T.Optional[str] + stdinc: bool + valist_marshallers: bool class GenerateVapi(TypedDict): @@ -1726,15 +1726,15 @@ class GnomeModule(ExtensionModule): DEPEND_FILES_KW.evolve(since='0.61.0'), DEPENDS_KW.evolve(since='0.61.0'), INSTALL_KW.evolve(name='install_header'), - KwargInfo('extra_args', ContainerTypeInfo(list, str), listify=True), + KwargInfo('extra_args', ContainerTypeInfo(list, str), listify=True, default=[]), KwargInfo('install_dir', (str, NoneType)), - KwargInfo('internal', (str, NoneType)), - KwargInfo('nostdinc', (str, NoneType)), + KwargInfo('internal', bool, default=False), + KwargInfo('nostdinc', bool, default=False), KwargInfo('prefix', (str, NoneType)), - KwargInfo('skip_source', (str, NoneType)), + KwargInfo('skip_source', bool, default=False), KwargInfo('sources', ContainerTypeInfo(list, str, allow_empty=False), listify=True, required=True), - KwargInfo('stdinc', (str, NoneType)), - KwargInfo('valist_marshallers', (str, NoneType)), + KwargInfo('stdinc', bool, default=False), + KwargInfo('valist_marshallers', bool, default=False), ) def genmarshal(self, state: 'ModuleState', args: T.Tuple[str], kwargs: 'GenMarshal') -> ModuleReturnValue: output = args[0] @@ -1755,10 +1755,10 @@ class GnomeModule(ExtensionModule): for k in ['internal', 'nostdinc', 'skip_source', 'stdinc', 'valist_marshallers']: # Mypy can't figure out that this is correct if kwargs[k]: # type: ignore - cmd.extend([f'--{k.replace("_", "-")}', kwargs[k]]) # type: ignore + cmd.append(f'--{k.replace("_", "-")}') install_header = kwargs['install_header'] - install_dir = kwargs['install_dir'] + install_dir: T.List[T.Union[str, bool]] = kwargs['install_dir'] or [] custom_kwargs: T.Dict[str, T.Any] = { |