Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions stubs/tabulate/tabulate/__init__.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from _typeshed import DataclassInstance
from collections.abc import Callable, Container, Iterable, Mapping, Sequence
from typing import Any, Final, Literal, NamedTuple, TypeAlias
from typing_extensions import Self
Expand Down Expand Up @@ -44,7 +45,7 @@ multiline_formats: dict[str, str]
def simple_separated_format(separator: str) -> TableFormat: ...
def tabulate(
# The key is converted using str().
tabular_data: Mapping[Any, Iterable[Any]] | Iterable[Iterable[Any]],
tabular_data: Mapping[Any, Iterable[Any]] | Iterable[Iterable[Any]] | Iterable[DataclassInstance],
headers: str | dict[str, str] | Sequence[str] = (),
tablefmt: str | TableFormat = "simple",
floatfmt: str | Iterable[str] = "g",
Expand All @@ -61,7 +62,7 @@ def tabulate(
headersglobalalign: Literal["right", "center", "left"] | None = None,
headersalign: Iterable[str | None] | None = None,
rowalign: str | Iterable[str] | None = None,
maxheadercolwidths: int | Iterable[int] | None = None,
maxheadercolwidths: int | Iterable[int | None] | None = None,
break_long_words: bool = True,
break_on_hyphens: bool = True,
) -> str: ...
Expand Down
Loading