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

Method setup_instance

traitlets/traitlets.py:1310–1323  ·  view source on GitHub ↗

This is called **before** self.__init__ is called.

(self, /, *args: t.Any, **kwargs: t.Any)

Source from the content-addressed store, hash-verified

1308 return inst
1309
1310 def setup_instance(self, /, *args: t.Any, **kwargs: t.Any) -> None:
1311 """
1312 This is called **before** self.__init__ is called.
1313 """
1314
1315 self._cross_validation_lock = False
1316 cls = self.__class__
1317 # Let descriptors performance initialization when a HasDescriptor
1318 # instance is created. This allows registration of observers and
1319 # default creations or other bookkeepings.
1320 # Note that descriptors can opt-out of this behavior by overriding
1321 # subclass_init.
1322 for init in cls._instance_inits:
1323 init(self)
1324
1325
1326class HasTraits(HasDescriptors, metaclass=MetaHasTraits):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected