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

Method __call__

traitlets/traitlets.py:932–943  ·  view source on GitHub ↗
(self, change: Bunch)

Source from the content-addressed store, hash-verified

930 return bool(self.cb == other)
931
932 def __call__(self, change: Bunch) -> None:
933 # The wrapper is callable
934 if self.nargs == 0:
935 self.cb()
936 elif self.nargs == 1:
937 self.cb(change.name)
938 elif self.nargs == 2:
939 self.cb(change.name, change.new)
940 elif self.nargs == 3:
941 self.cb(change.name, change.old, change.new)
942 elif self.nargs == 4:
943 self.cb(change.name, change.old, change.new, change.owner)
944
945
946def _callback_wrapper(cb: t.Any) -> _CallbackWrapper:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected