From 200891fed1f8c7f290cec3bdc90b35da95cb8260 Mon Sep 17 00:00:00 2001 From: Shantanu <12621235+hauntsaninja@users.noreply.github.com> Date: Thu, 30 Jun 2022 12:20:39 +0530 Subject: [PATCH] Bump prettytable to 3.3.* (#8207) Co-authored-by: hauntsaninja <> Co-authored-by: Alex Waygood --- stubs/prettytable/METADATA.toml | 2 +- stubs/prettytable/prettytable/__init__.pyi | 2 + stubs/prettytable/prettytable/colortable.pyi | 42 +++++++++++++ stubs/prettytable/prettytable/prettytable.pyi | 60 +++++++++++++++++++ 4 files changed, 105 insertions(+), 1 deletion(-) create mode 100644 stubs/prettytable/prettytable/colortable.pyi diff --git a/stubs/prettytable/METADATA.toml b/stubs/prettytable/METADATA.toml index ec7ff4ca3..c7cec0fc8 100644 --- a/stubs/prettytable/METADATA.toml +++ b/stubs/prettytable/METADATA.toml @@ -1,4 +1,4 @@ -version = "2.1.*" +version = "3.3.*" [tool.stubtest] ignore_missing_stub = false diff --git a/stubs/prettytable/prettytable/__init__.pyi b/stubs/prettytable/prettytable/__init__.pyi index c6eedb462..f66d036bc 100644 --- a/stubs/prettytable/prettytable/__init__.pyi +++ b/stubs/prettytable/prettytable/__init__.pyi @@ -1,6 +1,7 @@ from .prettytable import ( ALL as ALL, DEFAULT as DEFAULT, + DOUBLE_BORDER as DOUBLE_BORDER, FRAME as FRAME, HEADER as HEADER, MARKDOWN as MARKDOWN, @@ -9,6 +10,7 @@ from .prettytable import ( ORGMODE as ORGMODE, PLAIN_COLUMNS as PLAIN_COLUMNS, RANDOM as RANDOM, + SINGLE_BORDER as SINGLE_BORDER, PrettyTable as PrettyTable, TableHandler as TableHandler, from_csv as from_csv, diff --git a/stubs/prettytable/prettytable/colortable.pyi b/stubs/prettytable/prettytable/colortable.pyi new file mode 100644 index 000000000..d4f7b788f --- /dev/null +++ b/stubs/prettytable/prettytable/colortable.pyi @@ -0,0 +1,42 @@ +from _typeshed import Incomplete +from collections.abc import Callable +from typing import ClassVar + +from .prettytable import PrettyTable + +RESET_CODE: str + +init: Callable[[], object] + +class Theme: + default_color: str + vertical_char: str + vertical_color: str + horizontal_char: str + horizontal_color: str + junction_char: str + junction_color: str + def __init__( + self, + default_color: str = ..., + vertical_char: str = ..., + vertical_color: str = ..., + horizontal_char: str = ..., + horizontal_color: str = ..., + junction_char: str = ..., + junction_color: str = ..., + ) -> None: ... + def format_code(s: str) -> str: ... # type: ignore + +class Themes: + DEFAULT: ClassVar[Theme] + OCEAN: ClassVar[Theme] + +class ColorTable(PrettyTable): + def __init__(self, field_names: Incomplete | None = ..., **kwargs) -> None: ... + @property + def theme(self) -> Theme: ... + @theme.setter + def theme(self, value: Theme): ... + def update_theme(self) -> None: ... + def get_string(self, **kwargs): ... diff --git a/stubs/prettytable/prettytable/prettytable.pyi b/stubs/prettytable/prettytable/prettytable.pyi index 71eb2a38e..5c2e67cee 100644 --- a/stubs/prettytable/prettytable/prettytable.pyi +++ b/stubs/prettytable/prettytable/prettytable.pyi @@ -1,3 +1,4 @@ +from _typeshed import Incomplete from html.parser import HTMLParser from typing import Any @@ -11,6 +12,9 @@ PLAIN_COLUMNS: int MARKDOWN: int ORGMODE: int RANDOM: int +SINGLE_BORDER: int +DOUBLE_BORDER: int +BASE_ALIGN_VALUE: str class PrettyTable: encoding: Any @@ -141,6 +145,62 @@ class PrettyTable: def oldsortslice(self): ... @oldsortslice.setter def oldsortslice(self, val) -> None: ... + @property + def bottom_junction_char(self): ... + @bottom_junction_char.setter + def bottom_junction_char(self, val) -> None: ... + @property + def bottom_left_junction_char(self): ... + @bottom_left_junction_char.setter + def bottom_left_junction_char(self, val) -> None: ... + @property + def bottom_right_junction_char(self): ... + @bottom_right_junction_char.setter + def bottom_right_junction_char(self, val) -> None: ... + @property + def custom_format(self): ... + @custom_format.setter + def custom_format(self, val) -> None: ... + @property + def horizontal_align_char(self): ... + @horizontal_align_char.setter + def horizontal_align_char(self, val) -> None: ... + @property + def left_junction_char(self): ... + @left_junction_char.setter + def left_junction_char(self, val) -> None: ... + @property + def none_format(self): ... + @none_format.setter + def none_format(self, val) -> None: ... + @property + def preserve_internal_border(self): ... + @preserve_internal_border.setter + def preserve_internal_border(self, val) -> None: ... + @property + def right_junction_char(self): ... + @right_junction_char.setter + def right_junction_char(self, val) -> None: ... + @property + def top_junction_char(self): ... + @top_junction_char.setter + def top_junction_char(self, val) -> None: ... + @property + def top_left_junction_char(self): ... + @top_left_junction_char.setter + def top_left_junction_char(self, val) -> None: ... + @property + def top_right_junction_char(self): ... + @top_right_junction_char.setter + def top_right_junction_char(self, val) -> None: ... + @property + def xhtml(self) -> bool: ... + @xhtml.setter + def xhtml(self, val: bool) -> None: ... + @property + def rows(self) -> list[Incomplete]: ... + def add_autoindex(self, fieldname: str = ...): ... + def get_latex_string(self, **kwargs) -> str: ... def set_style(self, style) -> None: ... def add_rows(self, rows) -> None: ... def add_row(self, row) -> None: ...