Add default values for third-party stubs beginning with 'P' (#9957)

This commit is contained in:
Alex Waygood
2023-03-27 18:58:53 +01:00
committed by GitHub
parent 20f9b3685d
commit 6fd7e36e80
248 changed files with 2181 additions and 2133 deletions

View File

@@ -18,13 +18,13 @@ class Theme:
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 = ...,
default_color: str = "",
vertical_char: str = "|",
vertical_color: str = "",
horizontal_char: str = "-",
horizontal_color: str = "",
junction_char: str = "+",
junction_color: str = "",
) -> None: ...
# The following method is broken in upstream code.
def format_code(s: str) -> str: ... # type: ignore[misc] # pyright: ignore[reportGeneralTypeIssues]
@@ -34,7 +34,7 @@ class Themes:
OCEAN: ClassVar[Theme]
class ColorTable(PrettyTable):
def __init__(self, field_names: Incomplete | None = ..., **kwargs) -> None: ...
def __init__(self, field_names: Incomplete | None = None, **kwargs) -> None: ...
@property
def theme(self) -> Theme: ...
@theme.setter

View File

@@ -18,7 +18,7 @@ BASE_ALIGN_VALUE: str
class PrettyTable:
encoding: Any
def __init__(self, field_names: Incomplete | None = ..., **kwargs): ...
def __init__(self, field_names: Incomplete | None = None, **kwargs): ...
def __getattr__(self, name: str): ...
def __getitem__(self, index): ...
@property
@@ -199,24 +199,24 @@ class PrettyTable:
def xhtml(self, val: bool) -> None: ...
@property
def rows(self) -> list[Incomplete]: ...
def add_autoindex(self, fieldname: str = ...): ...
def add_autoindex(self, fieldname: str = "Index"): ...
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: ...
def del_row(self, row_index) -> None: ...
def add_column(self, fieldname, column, align: str = ..., valign: str = ...) -> None: ...
def add_column(self, fieldname, column, align: str = "c", valign: str = "t") -> None: ...
def del_column(self, fieldname) -> None: ...
def clear_rows(self) -> None: ...
def clear(self) -> None: ...
def copy(self): ...
def get_string(self, **kwargs) -> str: ...
def paginate(self, page_length: int = ..., line_break: str = ..., **kwargs): ...
def paginate(self, page_length: int = 58, line_break: str = "\x0c", **kwargs): ...
def get_csv_string(self, **kwargs) -> str: ...
def get_json_string(self, **kwargs) -> str: ...
def get_html_string(self, **kwargs) -> str: ...
def from_csv(fp, field_names: Incomplete | None = ..., **kwargs): ...
def from_csv(fp, field_names: Incomplete | None = None, **kwargs): ...
def from_db_cursor(cursor, **kwargs): ...
def from_json(json_string, **kwargs): ...