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

Method center

rich/align.py:100–119  ·  view source on GitHub ↗

Align a renderable to the center.

(
        cls,
        renderable: "RenderableType",
        style: Optional[StyleType] = None,
        *,
        vertical: Optional[VerticalAlignMethod] = None,
        pad: bool = True,
        width: Optional[int] = None,
        height: Optional[int] = None,
    )

Source from the content-addressed store, hash-verified

98
99 @classmethod
100 def center(
101 cls,
102 renderable: "RenderableType",
103 style: Optional[StyleType] = None,
104 *,
105 vertical: Optional[VerticalAlignMethod] = None,
106 pad: bool = True,
107 width: Optional[int] = None,
108 height: Optional[int] = None,
109 ) -> "Align":
110 """Align a renderable to the center."""
111 return cls(
112 renderable,
113 "center",
114 style=style,
115 vertical=vertical,
116 pad=pad,
117 width=width,
118 height=height,
119 )
120
121 @classmethod
122 def right(

Callers 10

test_shortcutsFunction · 0.80
layout.pyFile · 0.80
bars.pyFile · 0.80
screen.pyFile · 0.80
print_calendarFunction · 0.80
table_movie.pyFile · 0.80
make_sponsor_messageFunction · 0.80
__rich_console__Method · 0.80
live.pyFile · 0.80
align.pyFile · 0.80

Calls

no outgoing calls

Tested by 1

test_shortcutsFunction · 0.64