aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2021-08-04 13:03:09 -0700
committerXavier Claessens <xclaesse@gmail.com>2021-08-04 19:09:08 -0400
commit2307cbd2ac1388b6ad2d4135a6d5519d4272afc9 (patch)
treea578eb489292951b7150a88f344c64ac83de09dc
parentd1b52b913f0a7fad1f83a164e1db7b060d540915 (diff)
downloadmeson-2307cbd2ac1388b6ad2d4135a6d5519d4272afc9.zip
meson-2307cbd2ac1388b6ad2d4135a6d5519d4272afc9.tar.gz
meson-2307cbd2ac1388b6ad2d4135a6d5519d4272afc9.tar.bz2
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.
-rw-r--r--mesonbuild/interpreter/type_checking.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/interpreter/type_checking.py b/mesonbuild/interpreter/type_checking.py
index e3b2c4b..d6855c3 100644
--- a/mesonbuild/interpreter/type_checking.py
+++ b/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,