Skip to content

Commit

Permalink
Add missing symbols to tabulate (#9781)
Browse files Browse the repository at this point in the history
  • Loading branch information
Avasam authored Feb 20, 2023
1 parent 41d7ddb commit 040103a
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 9 deletions.
23 changes: 17 additions & 6 deletions stubs/tabulate/tabulate/__init__.pyi
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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]],
Expand All @@ -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: ...
9 changes: 6 additions & 3 deletions stubs/tabulate/tabulate/version.pyi
Original file line number Diff line number Diff line change
@@ -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]]

0 comments on commit 040103a

Please sign in to comment.