diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2022-07-25 13:14:12 -0700 |
---|---|---|
committer | Eli Schwartz <eschwartz93@gmail.com> | 2022-08-18 21:57:36 -0400 |
commit | 25a3eff797acd08f08d41f09447df0a8e8a21e4d (patch) | |
tree | b225b28d3406cbc97a79c96144559d5ac6e21ffe /mesonbuild/interpreterbase | |
parent | 991baf56e99d96bbe3f2841f4b7c283e36ff1c89 (diff) | |
download | meson-25a3eff797acd08f08d41f09447df0a8e8a21e4d.zip meson-25a3eff797acd08f08d41f09447df0a8e8a21e4d.tar.gz meson-25a3eff797acd08f08d41f09447df0a8e8a21e4d.tar.bz2 |
interpreterbase: fix type annotations for KwargInfo::since_values
These are now allowed to be `Dict[_T | Type[list] | Type[dict], str]`,
but the type annotations weren't updated
Diffstat (limited to 'mesonbuild/interpreterbase')
-rw-r--r-- | mesonbuild/interpreterbase/decorators.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mesonbuild/interpreterbase/decorators.py b/mesonbuild/interpreterbase/decorators.py index 5dd8b89..50f2475 100644 --- a/mesonbuild/interpreterbase/decorators.py +++ b/mesonbuild/interpreterbase/decorators.py @@ -389,10 +389,10 @@ class KwargInfo(T.Generic[_T]): default: T.Optional[_T] = None, since: T.Optional[str] = None, since_message: T.Optional[str] = None, - since_values: T.Optional[T.Dict[_T, T.Union[str, T.Tuple[str, str]]]] = None, + since_values: T.Optional[T.Dict[T.Union[_T, T.Type[T.List], T.Type[T.Dict]], T.Union[str, T.Tuple[str, str]]]] = None, deprecated: T.Optional[str] = None, deprecated_message: T.Optional[str] = None, - deprecated_values: T.Optional[T.Dict[_T, T.Union[str, T.Tuple[str, str]]]] = None, + deprecated_values: T.Optional[T.Dict[T.Union[_T, T.Type[T.List], T.Type[T.Dict]], T.Union[str, T.Tuple[str, 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): @@ -418,10 +418,10 @@ class KwargInfo(T.Generic[_T]): default: T.Union[_T, None, _NULL_T] = _NULL, since: T.Union[str, None, _NULL_T] = _NULL, since_message: T.Union[str, None, _NULL_T] = _NULL, - since_values: T.Union[T.Dict[_T, T.Union[str, T.Tuple[str, str]]], None, _NULL_T] = _NULL, + since_values: T.Union[T.Dict[T.Union[_T, T.Type[T.List], T.Type[T.Dict]], T.Union[str, T.Tuple[str, str]]], None, _NULL_T] = _NULL, deprecated: T.Union[str, None, _NULL_T] = _NULL, deprecated_message: T.Union[str, None, _NULL_T] = _NULL, - deprecated_values: T.Union[T.Dict[_T, T.Union[str, T.Tuple[str, str]]], None, _NULL_T] = _NULL, + deprecated_values: T.Union[T.Dict[T.Union[_T, T.Type[T.List], T.Type[T.Dict]], T.Union[str, T.Tuple[str, str]]], None, _NULL_T] = _NULL, validator: T.Union[T.Callable[[_T], T.Optional[str]], None, _NULL_T] = _NULL, convertor: T.Union[T.Callable[[_T], TYPE_var], None, _NULL_T] = _NULL) -> 'KwargInfo': """Create a shallow copy of this KwargInfo, with modifications. |