You are viewing an older version (5.14.3). Go to latest (5.15.0)
{ } Raw JSON

bundles / traitlets 5.14.3 / traitlets / traitlets / _validate_bounds

function

traitlets.traitlets:_validate_bounds

source: /traitlets/traitlets.py :2558

Signature

def   _validate_bounds ( trait : Int[t.Any, t.Any] | Float[t.Any, t.Any] obj : t.Any value : t.Any )  →  t.Any

Summary

Validate that a number to be applied to a trait is between bounds.

Extended Summary

If value is not between min_bound and max_bound, this raises a TraitError with an error message appropriate for this trait.

Aliases

  • traitlets.traitlets._validate_bounds