aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2021-12-09 09:53:04 -0800
committerDylan Baker <dylan@pnwbakers.com>2021-12-09 13:00:42 -0800
commite37fd94654dfc69620f3ad79bbb375c0e38feee8 (patch)
treefc9c2e72c96baabece8bd3d0682d0ef00f72571b /mesonbuild
parent29f6724f3947f8e48caaa9d39456c33062c5c02f (diff)
downloadmeson-e37fd94654dfc69620f3ad79bbb375c0e38feee8.zip
meson-e37fd94654dfc69620f3ad79bbb375c0e38feee8.tar.gz
meson-e37fd94654dfc69620f3ad79bbb375c0e38feee8.tar.bz2
modules/gnome: Fix handling of flags to genmarshal
These are actually just flags, they don't take any arguments (except prefix, which was already handled correctly), and as such their arguments should be booleans, not strings, and they should default to False.
Diffstat (limited to 'mesonbuild')
-rw-r--r--mesonbuild/modules/gnome.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
index 9f2eccf..a91ed76 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):
@@ -1728,13 +1728,13 @@ class GnomeModule(ExtensionModule):
INSTALL_KW.evolve(name='install_header'),
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,7 +1755,7 @@ 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']