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

Method default

traitlets/traitlets.py:2437–2444  ·  view source on GitHub ↗
(self, obj: t.Any = None)

Source from the content-addressed store, hash-verified

2435 super().__init__(**kwargs)
2436
2437 def default(self, obj: t.Any = None) -> t.Any:
2438 default = super().default(obj)
2439 for trait in self.trait_types:
2440 if default is Undefined:
2441 default = trait.default(obj)
2442 else:
2443 break
2444 return default
2445
2446 def class_init(self, cls: type[HasTraits], name: str | None) -> None:
2447 for trait_type in reversed(self.trait_types):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected