aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2021-06-01 12:00:16 -0700
committerDylan Baker <dylan@pnwbakers.com>2021-06-04 20:10:05 -0700
commit8890a624997a9cf56ead08bda03e9b46803986ad (patch)
treeee019622c3dc597a61ce20601e2d7ea7bca23165
parentdf4d2bd24729a06c604a52aad4b44c5ddbd608fa (diff)
downloadmeson-8890a624997a9cf56ead08bda03e9b46803986ad.zip
meson-8890a624997a9cf56ead08bda03e9b46803986ad.tar.gz
meson-8890a624997a9cf56ead08bda03e9b46803986ad.tar.bz2
interpreterbase: fix type annotations for typed_pos_args
It takes a tuple of any length, for optargs and varargs, not a tuple of length 1
-rw-r--r--mesonbuild/interpreterbase.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/interpreterbase.py b/mesonbuild/interpreterbase.py
index 4318023..750101e 100644
--- a/mesonbuild/interpreterbase.py
+++ b/mesonbuild/interpreterbase.py
@@ -238,8 +238,8 @@ class permittedKwargs:
def typed_pos_args(name: str, *types: T.Union[T.Type, T.Tuple[T.Type, ...]],
- varargs: T.Optional[T.Union[T.Type, T.Tuple[T.Type]]] = None,
- optargs: T.Optional[T.List[T.Union[T.Type, T.Tuple[T.Type]]]] = None,
+ varargs: T.Optional[T.Union[T.Type, T.Tuple[T.Type, ...]]] = None,
+ optargs: T.Optional[T.List[T.Union[T.Type, T.Tuple[T.Type, ...]]]] = None,
min_varargs: int = 0, max_varargs: int = 0) -> T.Callable[..., T.Any]:
"""Decorator that types type checking of positional arguments.