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

Method _update_source

traitlets/traitlets.py:347–355  ·  view source on GitHub ↗
(self, change: t.Any)

Source from the content-addressed store, hash-verified

345 )
346
347 def _update_source(self, change: t.Any) -> None:
348 if self.updating:
349 return
350 with self._busy_updating():
351 setattr(self.source[0], self.source[1], self._transform_inv(change.new))
352 if getattr(self.target[0], self.target[1]) != change.new:
353 raise TraitError(
354 f"Broken link {self}: the target value changed while updating " "the source."
355 )
356
357 def unlink(self) -> None:
358 self.source[0].unobserve(self._update_target, names=self.source[1])

Callers

nothing calls this directly

Calls 2

_busy_updatingMethod · 0.95
TraitErrorClass · 0.85

Tested by

no test coverage detected