text_lint.operations.validators.validate_not_membership.ValidateNotMembership

class text_lint.operations.validators.validate_not_membership.ValidateNotMembership(name: str, saved_container: AliasYamlLookupExpressionSet, saved_value: AliasYamlLookupExpressionSet)[Quellcode]

Bases: ValidationComparisonBase

A validator to check if values are not found inside a result.

__init__(name: str, saved_container: AliasYamlLookupExpressionSet, saved_value: AliasYamlLookupExpressionSet) None[Quellcode]

Initialize ValidateNotMembership 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 not in the evaluated result_a value set.

Rückgabetyp:

bool