interpreter/typing: Add some type annotations

We really need PEP464 to annotate many fo thse correctly, but until then
we can manually annotate many of them to fix typing issues.
pull/9066/head
Dylan Baker 4 years ago committed by Xavier Claessens
parent d1b52b913f
commit 2307cbd2ac
  1. 4
      mesonbuild/interpreter/type_checking.py

@ -89,7 +89,7 @@ LANGUAGE_KW = KwargInfo(
validator=_language_validator,
convertor=lambda x: [i.lower() for i in x])
INSTALL_MODE_KW = KwargInfo(
INSTALL_MODE_KW: KwargInfo[T.List[T.Union[str, bool, int]]] = KwargInfo(
'install_mode',
ContainerTypeInfo(list, (str, bool, int)),
listify=True,
@ -98,7 +98,7 @@ INSTALL_MODE_KW = KwargInfo(
convertor=_install_mode_convertor,
)
REQUIRED_KW = KwargInfo(
REQUIRED_KW: KwargInfo[T.Union[bool, UserFeatureOption]] = KwargInfo(
'required',
(bool, UserFeatureOption),
default=True,

Loading…
Cancel
Save