fix invalid type for default_options

We have two checks for the type accepted here. One is the basic
typed_kwargs type-checking, which declares it accepts:

  str | include_directories

The other is the custom validator which further narrows it to strings
with certain option-like properties (needs to be an = assignment).

The former is obviously wrong, which doesn't really matter all that much
but still isn't very nice...

Introduced in commit f34013fb08.
pull/7177/head
Eli Schwartz 3 years ago committed by Xavier Claessens
parent 194c28297f
commit 37fea63033
  1. 2
      mesonbuild/interpreter/type_checking.py

@ -328,7 +328,7 @@ INCLUDE_DIRECTORIES: KwargInfo[T.List[T.Union[str, IncludeDirs]]] = KwargInfo(
# for cases like default_options and override_options
DEFAULT_OPTIONS: KwargInfo[T.List[str]] = KwargInfo(
'default_options',
ContainerTypeInfo(list, (str, IncludeDirs)),
ContainerTypeInfo(list, str),
listify=True,
default=[],
validator=_options_validator,

Loading…
Cancel
Save