mirror of https://github.com/Textualize/rich.git
add types
This commit is contained in:
parent
13b29e465e
commit
84d9a1d879
|
@ -40,31 +40,31 @@ class Column:
|
|||
"""Defines a column in a table."""
|
||||
|
||||
header: "RenderableType" = ""
|
||||
"""Renderable for the header (typically a string)"""
|
||||
"""RenderableType: Renderable for the header (typically a string)"""
|
||||
|
||||
footer: "RenderableType" = ""
|
||||
"""Renderable for the footer (typically a string)"""
|
||||
"""RenderableType: Renderable for the footer (typically a string)"""
|
||||
|
||||
header_style: StyleType = "table.header"
|
||||
"""The style of the header."""
|
||||
"""StyleType: The style of the header."""
|
||||
|
||||
footer_style: StyleType = "table.footer"
|
||||
"""The style of the footer."""
|
||||
"""StyleType: The style of the footer."""
|
||||
|
||||
style: StyleType = "none"
|
||||
"""The style of the column."""
|
||||
"""StyleType: The style of the column."""
|
||||
|
||||
justify: "JustifyValues" = "left"
|
||||
"""How to justify text within the column ("left", "center", "right", or "full")"""
|
||||
"""str: How to justify text within the column ("left", "center", "right", or "full")"""
|
||||
|
||||
width: Optional[int] = None
|
||||
"""Width of the column, or ``None`` (default) to auto calculate width."""
|
||||
"""Optional[int]: Width of the column, or ``None`` (default) to auto calculate width."""
|
||||
|
||||
ratio: Optional[int] = None
|
||||
"""Ratio to use when calculating column width, or ``None`` (default) to adapt to column contents."""
|
||||
"""Optional[int]: Ratio to use when calculating column width, or ``None`` (default) to adapt to column contents."""
|
||||
|
||||
no_wrap: bool = False
|
||||
"""Prevent wrapping of text within the column. Defaults to ``False``."""
|
||||
"""bool: Prevent wrapping of text within the column. Defaults to ``False``."""
|
||||
|
||||
_cells: List["RenderableType"] = field(default_factory=list)
|
||||
|
||||
|
|
Loading…
Reference in New Issue