from IPython.utils.traitlets import *
class Foo(HasTraits):
bar = Type(allow_none=False)
foo = Foo(bar=int)
yields The 'bar' trait of a Foo instance must be a subclass of object, but a value of type 'NoneType' (i.e. None) was specified.
The default value is validated while it is not needed.
yields
The 'bar' trait of a Foo instance must be a subclass of object, but a value of type 'NoneType' (i.e. None) was specified.The default value is validated while it is not needed.