conditional#

eclypse.policies.compose.conditional(predicate, policy)[source]#

Run policy only when predicate(graph) is true.

Parameters:
  • predicate (Callable[[AssetGraph], bool]) – Callable receiving the graph and returning a truthy value.

  • policy (UpdatePolicy) – Wrapped policy to call when predicate passes.

Returns:

Conditional policy.

Return type:

UpdatePolicy