aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2023-02-17 15:13:58 -0500
committerXavier Claessens <xclaesse@gmail.com>2023-03-04 14:19:27 -0500
commit93c11f249495c4af4a88206cebefef3ecf0f3228 (patch)
treede7e968e6e8abd50715c3a9038dc0e640b3babae
parent0f67913dee7d4173b1f7c5e95268d7bc4d4d858d (diff)
downloadmeson-93c11f249495c4af4a88206cebefef3ecf0f3228.zip
meson-93c11f249495c4af4a88206cebefef3ecf0f3228.tar.gz
meson-93c11f249495c4af4a88206cebefef3ecf0f3228.tar.bz2
typed_kwargs: Remove feature_validator as it's not currently used
-rw-r--r--mesonbuild/interpreterbase/decorators.py9
1 files changed, 0 insertions, 9 deletions
diff --git a/mesonbuild/interpreterbase/decorators.py b/mesonbuild/interpreterbase/decorators.py
index 7916072..c200d91 100644
--- a/mesonbuild/interpreterbase/decorators.py
+++ b/mesonbuild/interpreterbase/decorators.py
@@ -392,7 +392,6 @@ class KwargInfo(T.Generic[_T]):
added in.
:param not_set_warning: A warning message that is logged if the kwarg is not
set by the user.
- :param feature_validator: A callable returning an iterable of FeatureNew | FeatureDeprecated objects.
"""
def __init__(self, name: str,
types: T.Union[T.Type[_T], T.Tuple[T.Union[T.Type[_T], ContainerTypeInfo], ...], ContainerTypeInfo],
@@ -404,7 +403,6 @@ class KwargInfo(T.Generic[_T]):
deprecated: T.Optional[str] = None,
deprecated_message: T.Optional[str] = None,
deprecated_values: T.Optional[T.Dict[T.Union[_T, ContainerTypeInfo, type], T.Union[str, T.Tuple[str, str]]]] = None,
- feature_validator: T.Optional[T.Callable[[_T], T.Iterable[FeatureCheckBase]]] = 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):
@@ -416,7 +414,6 @@ class KwargInfo(T.Generic[_T]):
self.since = since
self.since_message = since_message
self.since_values = since_values
- self.feature_validator = feature_validator
self.deprecated = deprecated
self.deprecated_message = deprecated_message
self.deprecated_values = deprecated_values
@@ -435,7 +432,6 @@ class KwargInfo(T.Generic[_T]):
deprecated: T.Union[str, None, _NULL_T] = _NULL,
deprecated_message: T.Union[str, None, _NULL_T] = _NULL,
deprecated_values: T.Union[T.Dict[T.Union[_T, ContainerTypeInfo, type], T.Union[str, T.Tuple[str, str]]], None, _NULL_T] = _NULL,
- feature_validator: T.Union[T.Callable[[_T], T.Iterable[FeatureCheckBase]], 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.
@@ -461,7 +457,6 @@ class KwargInfo(T.Generic[_T]):
deprecated=deprecated if not isinstance(deprecated, _NULL_T) else self.deprecated,
deprecated_message=deprecated_message if not isinstance(deprecated_message, _NULL_T) else self.deprecated_message,
deprecated_values=deprecated_values if not isinstance(deprecated_values, _NULL_T) else self.deprecated_values,
- feature_validator=feature_validator if not isinstance(feature_validator, _NULL_T) else self.feature_validator,
validator=validator if not isinstance(validator, _NULL_T) else self.validator,
convertor=convertor if not isinstance(convertor, _NULL_T) else self.convertor,
)
@@ -577,10 +572,6 @@ def typed_kwargs(name: str, *types: KwargInfo, allow_unknown: bool = False) -> T
if msg is not None:
raise InvalidArguments(f'{name} keyword argument "{info.name}" {msg}')
- if info.feature_validator is not None:
- for each in info.feature_validator(value):
- each.use(subproject, node)
-
if info.deprecated_values is not None:
emit_feature_change(info.deprecated_values, FeatureDeprecated)