diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2021-12-01 15:45:48 -0800 |
---|---|---|
committer | Eli Schwartz <eschwartz93@gmail.com> | 2021-12-06 20:06:14 -0500 |
commit | 82136da933f0859edd6cf168a129ede706e9e055 (patch) | |
tree | e37ead97fcbf2351941bb311dddee5487453b449 /mesonbuild | |
parent | 7191b6dab2b310adb93238bac804008e9c9757b8 (diff) | |
download | meson-82136da933f0859edd6cf168a129ede706e9e055.zip meson-82136da933f0859edd6cf168a129ede706e9e055.tar.gz meson-82136da933f0859edd6cf168a129ede706e9e055.tar.bz2 |
interpreterbase/decorators: Fix types of deprecated_values and since_values
Which shouldn't be Dict[str, str], they should be Dict[_T, str], as nay
value that can be passed to types is valid here.
Diffstat (limited to 'mesonbuild')
-rw-r--r-- | mesonbuild/interpreterbase/decorators.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mesonbuild/interpreterbase/decorators.py b/mesonbuild/interpreterbase/decorators.py index 8c849e9..9434ab7 100644 --- a/mesonbuild/interpreterbase/decorators.py +++ b/mesonbuild/interpreterbase/decorators.py @@ -372,7 +372,8 @@ class KwargInfo(T.Generic[_T]): string, but the implementation using an Enum. This should not do validation, just conversion. :param deprecated_values: a dictionary mapping a value to the version of - meson it was deprecated in. + meson it was deprecated in. The Value may be any valid value for this + argument. :param since_values: a dictionary mapping a value to the version of meson it was added in. :param not_set_warning: A warning message that is logged if the kwarg is not @@ -385,7 +386,7 @@ class KwargInfo(T.Generic[_T]): since: T.Optional[str] = None, since_values: T.Optional[T.Dict[str, str]] = None, deprecated: T.Optional[str] = None, - deprecated_values: T.Optional[T.Dict[str, str]] = None, + deprecated_values: T.Optional[T.Dict[_T, str]] = None, validator: T.Optional[T.Callable[[T.Any], T.Optional[str]]] = None, convertor: T.Optional[T.Callable[[_T], object]] = None, not_set_warning: T.Optional[str] = None): |