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

Class MyIntTT

tests/test_traitlets.py:132–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

130
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 5

AClass · 0.85
BClass · 0.85
test_tag_metadataMethod · 0.85

Calls

no outgoing calls

Used in the wild real call sites across dependent graphs

searching dependent graphs…