Several checks run as one; annotations describe the group
(its expected is the default text of its members' failures).
Attributes#
| Attribute | Type | Description |
|---|---|---|
checks | tuple[Check[T_contra], *(tuple[Check[T_contra], ...])] | |
annotations | Annotations | None = None |
Functions#
__init__#
__init__(checks, annotations=None) -> None| Parameter | Type | Description |
|---|---|---|
checks | tuple[Check[T_contra], *(tuple[Check[T_contra], ...])] | |
annotations | Annotations | None = None |
annotate#
annotate(**annotations) -> FilterGroup[T_contra]| Parameter | Type | Description |
|---|---|---|
annotations | object = {} |
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]| Parameter | Type | Description |
|---|---|---|
other | Check[T] | |
annotations | object = {} |
Returns FilterGroup[T]
def and_[T](self: FilterGroup[T], other: Check[T], /, **annotations: object) -> FilterGroup[T]:
return FilterGroup((self, other), annotations or None)