class C(trt.HasTraits): a = trt.Int(1) b = trt.Int() @trt.default('b') def _make_b(self): return 2
def eventful_trait(): recursed_trait = trt.Tuple(trt.Int(), trt.List(eventful=True)) recursed_trait._traits[1]._trait = recursed_trait return recursed_trait
def recursed_trait(): recursed_trait = trt.Tuple(trt.Int(), trt.List()) recursed_trait._traits[1]._trait = recursed_trait return recursed_trait
class D(C): d = trt.Int(4) e = trt.Int()
class C(trt.HasTraits): aa = trt.Int(1) a = 0
class D(cmdlets.Spec, C): d = trt.Int(4) e = trt.Int()
class RootCmd(cmdlets.Cmd): subcommands = {'sub': (SubCmd, "help string")} a = trt.Int(config=True) b = trt.Int(config=True)
class SubCmd(cmdlets.Cmd): s = trt.Int(config=True)
class C(trc.Configurable): "Class help" a = trt.Int(1, config=True, help="Trait help test") b = trt.Int(1, config=True, help="2nd trait help test")