Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion stubs/tabulate/METADATA.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version = "0.9.*"
version = "0.10.*"
upstream_repository = "https://github.com/astanin/python-tabulate"
19 changes: 12 additions & 7 deletions stubs/tabulate/tabulate/__init__.pyi
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
from collections.abc import Callable, Container, Iterable, Mapping, Sequence
from typing import Any, Final, NamedTuple
from typing import Any, Final, Literal, NamedTuple
from typing_extensions import Self, TypeAlias

from .version import __version__ as __version__

__all__ = ["tabulate", "tabulate_formats", "simple_separated_format"]

__version__: Final[str]
# These constants are meant to be configurable
# https://github.com/astanin/python-tabulate#text-formatting
PRESERVE_WHITESPACE: bool
MIN_PADDING: int
PRESERVE_WHITESPACE: Final[bool]
MIN_PADDING: Final[int]
# https://github.com/astanin/python-tabulate#wide-fullwidth-cjk-symbols
WIDE_CHARS_MODE: bool
SEPARATING_LINE: str
WIDE_CHARS_MODE: Final[bool]
SEPARATING_LINE: Final[str]
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment above these items implies that these should not be Final.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, sure. Sorry


class Line(NamedTuple):
begin: str
Expand Down Expand Up @@ -55,10 +54,16 @@ def tabulate(
missingval: str | Iterable[str] = "",
showindex: str | bool | Iterable[Any] = "default",
disable_numparse: bool | Iterable[int] = False,
colglobalalign: Literal["right", "center", "decimal", "left"] | None = None,
colalign: Iterable[str | None] | None = None,
preserve_whitespace: bool = False,
maxcolwidths: int | Iterable[int | None] | None = None,
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,
break_long_words: bool = True,
break_on_hyphens: bool = True,
) -> str: ...

class JupyterHTMLStr(str):
Expand Down
6 changes: 0 additions & 6 deletions stubs/tabulate/tabulate/version.pyi

This file was deleted.