text_lint.operations.validators.validate_membership.ValidateMembership
- class text_lint.operations.validators.validate_membership.ValidateMembership(name: str, saved_container: AliasYamlLookupExpressionSet, saved_value: AliasYamlLookupExpressionSet)[Quellcode]
Bases:
ValidationComparisonBaseA validator to check if values are found inside a result.
- __init__(name: str, saved_container: AliasYamlLookupExpressionSet, saved_value: AliasYamlLookupExpressionSet) None[Quellcode]
Initialize ValidateMembership instances.
- Parameter:
name (str) – The configured name of this validator.
saved_container (AliasYamlLookupExpressionSet) – A list of lookup expressions yielding value sets.
saved_value (AliasYamlLookupExpressionSet) – A list of lookup expressions yielding single values.
- Raises:
TypeError
- comparison(result_a: AliasLookupResult, result_b: AliasLookupResult) bool[Quellcode]
Determine if result_b is in the evaluated result_a value set.
- Rückgabetyp:
bool