def _ensure_chz_validators()

in chz/validators.py [0:0]


def _ensure_chz_validators(cls: Any) -> None:
    if "__chz_validators__" not in cls.__dict__:
        # make a copy of the parent's validators, if any
        validators: list[Callable[[object], None]] = []
        for base in cls.__bases__:
            validators.extend(getattr(base, "__chz_validators__", []))
        cls.__chz_validators__ = validators