Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ipython/traitlets
/ _b_validate
Method
_b_validate
tests/test_traitlets.py:2333–2336 ·
view source on GitHub ↗
(self, value, trait)
Source
from the content-addressed store, hash-verified
2331
changes.append((old, new))
2332
2333
def
_b_validate(self, value, trait):
2334
if
value != 0:
2335
raise
TraitError(
"Only 0 is a valid value"
)
2336
return
value
2337
2338
# Test context manager and nesting
2339
t = Test()
Callers
nothing calls this directly
Calls
1
TraitError
Class · 0.90
Tested by
no test coverage detected