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

Class FixedValue

tests/test_traitlets.py:2011–2016  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2009 """Verify that the validate value is being used"""
2010
2011 class FixedValue(HasTraits):
2012 value = Int(0)
2013
2014 @validate("value")
2015 def _value_validate(self, proposal):
2016 return -1
2017
2018 u = FixedValue(value=2)
2019 assert u.value == -1

Callers 1

test_validate_usedMethod · 0.85

Calls 1

IntClass · 0.90

Tested by 1

test_validate_usedMethod · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…