Predicate

Predicate

class Predicate[source]

Bases: Protocol, Generic[configpile.parsers._Value_contra]

Defines a function or callable that takes a value and returns whether it is valid

Methods

List of members of Predicate

__call__(value)[source]

Checks whether the given value is valid

Parameters

value (TypeVar(_Value_contra, contravariant=True)) – Value to check

Return type

bool

Returns

True if the value is valid, False otherwise

__init__(*args, **kwargs)
static __new__(cls, *args, **kwds)