Add missing symbols to tabulate (#9781)

This commit is contained in:
Avasam
2023-02-20 18:57:10 -05:00
committed by GitHub
parent 41d7ddb5fe
commit 040103a74e
2 changed files with 23 additions and 9 deletions

View File

@@ -1,15 +1,18 @@
from collections.abc import Callable, Container, Iterable, Mapping, Sequence
from typing import Any, NamedTuple
from typing_extensions import TypeAlias
from typing_extensions import Final, Self, TypeAlias
__version__: str
from .version import __version__ as __version__
LATEX_ESCAPE_RULES: dict[str, str]
MIN_PADDING: int
__all__ = ["tabulate", "tabulate_formats", "simple_separated_format"]
# These constants are meant to be configurable
# https://github.com/astanin/python-tabulate#text-formatting
PRESERVE_WHITESPACE: bool
MIN_PADDING: int
# https://github.com/astanin/python-tabulate#wide-fullwidth-cjk-symbols
WIDE_CHARS_MODE: bool
multiline_formats: dict[str, str]
tabulate_formats: list[str]
SEPARATING_LINE: str
class Line(NamedTuple):
begin: str
@@ -35,6 +38,10 @@ class TableFormat(NamedTuple):
padding: int
with_header_hide: Container[str] | None
LATEX_ESCAPE_RULES: Final[dict[str, str]]
tabulate_formats: list[str]
multiline_formats: dict[str, str]
def simple_separated_format(separator: str) -> TableFormat: ...
def tabulate(
tabular_data: Mapping[str, Iterable[Any]] | Iterable[Iterable[Any]],
@@ -52,3 +59,7 @@ def tabulate(
rowalign: str | Iterable[str] | None = ...,
maxheadercolwidths: int | Iterable[int] | None = ...,
) -> str: ...
class JupyterHTMLStr(str):
@property
def str(self) -> Self: ...

View File

@@ -1,3 +1,6 @@
version: str
version_tuple: tuple[int, int, int]
__version_tuple__: tuple[int, int, int]
from typing_extensions import Final
version: Final[str]
__version__: Final[str]
version_tuple: Final[tuple[int, int, int]]
__version_tuple__: Final[tuple[int, int, int]]