massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-pyright / node_modules / pyright / dist / typeshed-fallback / stubs / tabulate / tabulate.pyi
1 from typing import Any, Callable, Container, Iterable, List, Mapping, NamedTuple, Sequence, Union
2
3 LATEX_ESCAPE_RULES: dict[str, str]
4 MIN_PADDING: int
5 PRESERVE_WHITESPACE: bool
6 WIDE_CHARS_MODE: bool
7 multiline_formats: dict[str, str]
8 tabulate_formats: list[str]
9
10 class Line(NamedTuple):
11     begin: str
12     hline: str
13     sep: str
14     end: str
15
16 class DataRow(NamedTuple):
17     begin: str
18     sep: str
19     end: str
20
21 _TableFormatLine = Union[None, Line, Callable[[List[int], List[str]], str]]
22 _TableFormatRow = Union[None, DataRow, Callable[[List[Any], List[int], List[str]], str]]
23
24 class TableFormat(NamedTuple):
25     lineabove: _TableFormatLine
26     linebelowheader: _TableFormatLine
27     linebetweenrows: _TableFormatLine
28     linebelow: _TableFormatLine
29     headerrow: _TableFormatRow
30     datarow: _TableFormatRow
31     padding: int
32     with_header_hide: Container[str] | None
33
34 def simple_separated_format(separator: str) -> TableFormat: ...
35 def tabulate(
36     tabular_data: Mapping[str, Iterable[Any]] | Iterable[Iterable[Any]],
37     headers: str | dict[str, str] | Sequence[str] = ...,
38     tablefmt: str | TableFormat = ...,
39     floatfmt: str | Iterable[str] = ...,
40     numalign: str | None = ...,
41     stralign: str | None = ...,
42     missingval: str | Iterable[str] = ...,
43     showindex: str | bool | Iterable[Any] = ...,
44     disable_numparse: bool | Iterable[int] = ...,
45     colalign: Iterable[str | None] | None = ...,
46 ) -> str: ...