argclz.validator.AbstractTypeValidatorBuilder#

class argclz.validator.AbstractTypeValidatorBuilder[source]#

Bases: Validator, Generic[T]

__init__(value_type=None)[source]#
Parameters:

value_type (type[T] | tuple[type[T], ...] | None)

Methods Summary

__init__([value_type])

freeze(*args, **kwargs)

(internal use) return a copy of itself.

optional()

__call__(value)

__and__(validator)

validator & validator

__or__(validator)

validator | validator

Details

freeze(*args, **kwargs)[source]#

(internal use) return a copy of itself.

Return type:

Self

optional()[source]#
Return type:

Self

__and__(validator)[source]#

validator & validator

Parameters:

validator (Callable[[Any], bool])

Return type:

AndValidatorBuilder

__or__(validator)[source]#

validator | validator

Parameters:

validator (Callable[[Any], bool])

Return type:

OrValidatorBuilder