stdlib: add argument default values (#9501)

This commit is contained in:
Jelle Zijlstra
2023-01-18 00:37:34 -08:00
committed by GitHub
parent 6cb934291f
commit ddfaca3200
272 changed files with 2529 additions and 2467 deletions

View File

@@ -27,19 +27,19 @@ class TextWrapper:
x: str # leaked loop variable
def __init__(
self,
width: int = ...,
initial_indent: str = ...,
subsequent_indent: str = ...,
expand_tabs: bool = ...,
replace_whitespace: bool = ...,
fix_sentence_endings: bool = ...,
break_long_words: bool = ...,
drop_whitespace: bool = ...,
break_on_hyphens: bool = ...,
tabsize: int = ...,
width: int = 70,
initial_indent: str = "",
subsequent_indent: str = "",
expand_tabs: bool = True,
replace_whitespace: bool = True,
fix_sentence_endings: bool = False,
break_long_words: bool = True,
drop_whitespace: bool = True,
break_on_hyphens: bool = True,
tabsize: int = 8,
*,
max_lines: int | None = ...,
placeholder: str = ...,
max_lines: int | None = None,
placeholder: str = " [...]",
) -> None: ...
# Private methods *are* part of the documented API for subclasses.
def _munge_whitespace(self, text: str) -> str: ...
@@ -53,7 +53,7 @@ class TextWrapper:
def wrap(
text: str,
width: int = ...,
width: int = 70,
*,
initial_indent: str = ...,
subsequent_indent: str = ...,
@@ -69,7 +69,7 @@ def wrap(
) -> list[str]: ...
def fill(
text: str,
width: int = ...,
width: int = 70,
*,
initial_indent: str = ...,
subsequent_indent: str = ...,
@@ -100,4 +100,4 @@ def shorten(
placeholder: str = ...,
) -> str: ...
def dedent(text: str) -> str: ...
def indent(text: str, prefix: str, predicate: Callable[[str], bool] | None = ...) -> str: ...
def indent(text: str, prefix: str, predicate: Callable[[str], bool] | None = None) -> str: ...