This is called **before** self.__init__ is called.
(self, /, *args: t.Any, **kwargs: t.Any)
| 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 | |
| 1326 | class HasTraits(HasDescriptors, metaclass=MetaHasTraits): |
nothing calls this directly
no outgoing calls
no test coverage detected