MCPcopy Index your code
hub / github.com/ipython/ipython / CapturingDisplayPublisher

Class CapturingDisplayPublisher

IPython/core/displaypub.py:184–205  ·  view source on GitHub ↗

A DisplayPublisher that stores

Source from the content-addressed store, hash-verified

182
183
184class CapturingDisplayPublisher(DisplayPublisher):
185 """A DisplayPublisher that stores"""
186
187 outputs: List = List()
188
189 def publish(
190 self, data, metadata=None, source=None, *, transient=None, update=False
191 ):
192 self.outputs.append(
193 {
194 "data": data,
195 "metadata": metadata,
196 "transient": transient,
197 "update": update,
198 }
199 )
200
201 def clear_output(self, wait=False):
202 super(CapturingDisplayPublisher, self).clear_output(wait)
203
204 # empty the list, *do not* reassign a new list
205 self.outputs.clear()

Callers 1

__enter__Method · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…