filterspec.Clause

One filter rule: when predicate holds, apply action.

Usage

Source

filterspec.Clause(
    predicate,
    action=Action.DROP,
    applies_to=frozenset(),
    negate=False,
    label=None
)

Parameter Attributes

predicate: Predicate
action: Action = Action.DROP
applies_to: frozenset[EventKind] = frozenset()
negate: bool = False
label: str | None = None

Attributes

predicate: Predicate

The condition tested against an event.

action: Action

DROP removes the event (first drop wins, stops evaluation); TAG records label on a surviving event and continues.

applies_to: frozenset[EventKind]

When non-empty, the clause is only evaluated for these kinds.

negate: bool

Invert the predicate match.

label: str | None
The label recorded by a TAG clause.