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

Method validate

tests/test_traitlets.py:133–136  ·  view source on GitHub ↗
(self, obj, value)

Source from the content-addressed store, hash-verified

131 def test_default_validate(self):
132 class MyIntTT(TraitType[int, int]):
133 def validate(self, obj, value):
134 if isinstance(value, int):
135 return value
136 self.error(obj, value)
137
138 class A(HasTraits):
139 tt = MyIntTT(10)

Callers

nothing calls this directly

Calls 1

errorMethod · 0.80

Tested by

no test coverage detected