MCPcopy
hub / github.com/Textualize/rich / grid

Method grid

rich/table.py:253–283  ·  view source on GitHub ↗

Get a table with no lines, headers, or footer. Args: *headers (Union[Column, str]): Column headers, either as a string, or :class:`~rich.table.Column` instance. padding (PaddingDimensions, optional): Get padding around cells. Defaults to 0. collapse_paddi

(
        cls,
        *headers: Union[Column, str],
        padding: PaddingDimensions = 0,
        collapse_padding: bool = True,
        pad_edge: bool = False,
        expand: bool = False,
    )

Source from the content-addressed store, hash-verified

251
252 @classmethod
253 def grid(
254 cls,
255 *headers: Union[Column, str],
256 padding: PaddingDimensions = 0,
257 collapse_padding: bool = True,
258 pad_edge: bool = False,
259 expand: bool = False,
260 ) -> "Table":
261 """Get a table with no lines, headers, or footer.
262
263 Args:
264 *headers (Union[Column, str]): Column headers, either as a string, or :class:`~rich.table.Column` instance.
265 padding (PaddingDimensions, optional): Get padding around cells. Defaults to 0.
266 collapse_padding (bool, optional): Enable collapsing of padding around cells. Defaults to True.
267 pad_edge (bool, optional): Enable padding around edges of table. Defaults to False.
268 expand (bool, optional): Expand the table to fit the available space if ``True``, otherwise the table width will be auto-calculated. Defaults to False.
269
270 Returns:
271 Table: A table instance.
272 """
273 return cls(
274 *headers,
275 box=None,
276 padding=padding,
277 collapse_padding=collapse_padding,
278 show_header=False,
279 show_footer=False,
280 show_edge=False,
281 pad_edge=pad_edge,
282 expand=expand,
283 )
284
285 @property
286 def expand(self) -> bool:

Callers 13

test_padding_widthFunction · 0.80
live_progress.pyFile · 0.80
make_sponsor_messageFunction · 0.80
__rich__Method · 0.80
fullscreen.pyFile · 0.80
make_tasks_tableMethod · 0.80
_renderMethod · 0.80
make_test_cardFunction · 0.80
__rich_console__Method · 0.80
__call__Method · 0.80
summaryMethod · 0.80
renderMethod · 0.80

Calls

no outgoing calls

Tested by 1

test_padding_widthFunction · 0.64