GitHub

FilterGroup

API reference for FilterGroup.

Several checks run as one; annotations describe the group (its expected is the default text of its members' failures).

Attributes

AttributeTypeDescription
checkstuple[Check[T_contra], *(tuple[Check[T_contra], ...])]
annotationsAnnotations | None = None

Functions

__init__

__init__(checks, annotations=None) -> None
ParameterTypeDescription
checkstuple[Check[T_contra], *(tuple[Check[T_contra], ...])]
annotationsAnnotations | None = None

annotate

annotate(**annotations) -> FilterGroup[T_contra]
ParameterTypeDescription
annotationsobject = {}

Returns FilterGroup[T_contra]

def annotate(self, /, **annotations: object) -> FilterGroup[T_contra]:
    return replace(self, annotations={**(self.annotations or {}), **annotations})

and_

and_[T](other, **annotations) -> FilterGroup[T]
ParameterTypeDescription
otherCheck[T]
annotationsobject = {}

Returns FilterGroup[T]

def and_[T](self: FilterGroup[T], other: Check[T], /, **annotations: object) -> FilterGroup[T]:
    return FilterGroup((self, other), annotations or None)