MCPcopy Create free account
hub / github.com/datapane/datapane / wrap_block

Function wrap_block

python-client/src/datapane/blocks/base.py:111–121  ·  view source on GitHub ↗
(b: BlockOrPrimitive)

Source from the content-addressed store, hash-verified

109
110
111def wrap_block(b: BlockOrPrimitive) -> Block:
112 from .wrappers import convert_to_block
113
114 # if isinstance(b, Page):
115 # raise DPClientError("Page objects can only be at the top-level")
116 if not isinstance(b, BaseBlock):
117 # import here as a very slow module due to nested imports
118 # from ..files import convert
119
120 return convert_to_block(b)
121 return t.cast("Block", b)

Callers 3

output_cell_to_blockFunction · 0.90
formatMethod · 0.85
__init__Method · 0.85

Calls 1

convert_to_blockFunction · 0.85

Tested by

no test coverage detected