MCPcopy Index your code
hub / github.com/plotly/plotly.py / _activate_pending_renderers

Method _activate_pending_renderers

plotly/io/_renderers.py:198–219  ·  view source on GitHub ↗

Activate all renderers that are waiting in the _to_activate list Parameters ---------- cls Only activate renders that are subclasses of this class

(self, cls=object)

Source from the content-addressed store, hash-verified

196 self._render_on_display = bool(val)
197
198 def _activate_pending_renderers(self, cls=object):
199 """
200 Activate all renderers that are waiting in the _to_activate list
201
202 Parameters
203 ----------
204 cls
205 Only activate renders that are subclasses of this class
206 """
207 to_activate_with_cls = [
208 r for r in self._to_activate if cls and isinstance(r, cls)
209 ]
210
211 while to_activate_with_cls:
212 # Activate renderers from left to right so that right-most
213 # renderers take precedence
214 renderer = to_activate_with_cls.pop(0)
215 renderer.activate()
216
217 self._to_activate = [
218 r for r in self._to_activate if not (cls and isinstance(r, cls))
219 ]
220
221 def _validate_coerce_renderers(self, renderers_string):
222 """

Callers 3

_build_mime_bundleMethod · 0.95
init_notebook_modeFunction · 0.80

Calls 2

popMethod · 0.45
activateMethod · 0.45

Tested by

no test coverage detected