aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2023-01-17 13:41:41 -0800
committerEli Schwartz <eschwartz93@gmail.com>2023-01-20 00:18:42 -0500
commit432c46e67c3f528e956f6a696ba198bd0f89dbc0 (patch)
tree78faec7aa7a3c6551534dda292140426e2cd01d0
parent93e370c7ddbbc18d94bf0c6d24e24fc2cd9c98da (diff)
downloadmeson-432c46e67c3f528e956f6a696ba198bd0f89dbc0.zip
meson-432c46e67c3f528e956f6a696ba198bd0f89dbc0.tar.gz
meson-432c46e67c3f528e956f6a696ba198bd0f89dbc0.tar.bz2
coredata: get rid of UserArrayOption `**kwargs`
Let's just pass the two arguments explicitly.
-rw-r--r--mesonbuild/coredata.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/mesonbuild/coredata.py b/mesonbuild/coredata.py
index e689caa..3b87896 100644
--- a/mesonbuild/coredata.py
+++ b/mesonbuild/coredata.py
@@ -215,8 +215,11 @@ class UserComboOption(UserOption[str]):
return value
class UserArrayOption(UserOption[T.List[str]]):
- def __init__(self, description: str, value: T.Union[str, T.List[str]], split_args: bool = False, user_input: bool = False, allow_dups: bool = False, **kwargs: T.Any) -> None:
- super().__init__(description, kwargs.get('choices', []), yielding=kwargs.get('yielding', DEFAULT_YIELDING))
+ def __init__(self, description: str, value: T.Union[str, T.List[str]],
+ split_args: bool = False, user_input: bool = False,
+ allow_dups: bool = False, yielding: bool = DEFAULT_YIELDING,
+ choices: T.Optional[T.List[str]] = None) -> None:
+ super().__init__(description, choices if choices is not None else [], yielding)
self.split_args = split_args
self.allow_dups = allow_dups
self.value = self.validate_value(value, user_input=user_input)