Display the block as a side effect within a Jupyter notebook
(self)
| 67 | self._attributes.update(mk_attribs(**kwargs)) |
| 68 | |
| 69 | def _ipython_display_(self): |
| 70 | """Display the block as a side effect within a Jupyter notebook""" |
| 71 | from IPython.display import HTML, display |
| 72 | |
| 73 | from datapane.ipython.environment import get_environment |
| 74 | from datapane.processors.api import stringify_report |
| 75 | from datapane.view import Blocks |
| 76 | |
| 77 | if get_environment().support_rich_display: |
| 78 | html_str = stringify_report(Blocks(self)) |
| 79 | display(HTML(html_str)) |
| 80 | else: |
| 81 | display(self.__str__()) |
| 82 | |
| 83 | def accept(self, visitor: VV) -> VV: |
| 84 | visitor.visit(self) |
nothing calls this directly
no test coverage detected