MCPcopy Create free account
hub / github.com/ipython/traitlets / validate

Method validate

traitlets/traitlets.py:2824–2829  ·  view source on GitHub ↗
(self, obj: t.Any, value: t.Any)

Source from the content-addressed store, hash-verified

2822 ...
2823
2824 def validate(self, obj: t.Any, value: t.Any) -> G:
2825 try:
2826 value = float(value)
2827 except Exception:
2828 self.error(obj, value)
2829 return _validate_bounds(self, obj, value) # type:ignore[no-any-return]
2830
2831
2832class Complex(TraitType[complex, t.Union[complex, float, int]]):

Callers

nothing calls this directly

Calls 2

_validate_boundsFunction · 0.85
errorMethod · 0.80

Tested by

no test coverage detected