If#

class council.runners.If(predicate: Callable[[ChainContext], bool], runner: RunnerBase)[source]#

Bases: RunnerBase

Runner that executes only if the predicate returns True

__init__(predicate: Callable[[ChainContext], bool], runner: RunnerBase)[source]#
Parameters:
  • predicate – a predicate function

  • runner – a runner to be executed only if the predicate returns True