GitHub

API reference for Filter.

One check of a brand. expected names what passes (False reads "Expected <expected>"); message replaces every failure's text.

Attributes

AttributeTypeDescription
predicateCallable[[A], FilterOutput]
expectedstr | None = None
messagestr | None = None
abortedbool = False

Functions

__init__

__init__(predicate, expected=None, message=None, aborted=False) -> None
ParameterTypeDescription
predicateCallable[[A], FilterOutput]
expectedstr | None = None
messagestr | None = None
abortedbool = False

abort

abort() -> Filter[A]

This filter, stopping the checks after it when it fails.

Returns Filter[A]

def abort(self) -> Filter[A]:
    """This filter, stopping the checks after it when it fails."""
    return replace(self, aborted=True)