Stdlib: add defaults for several functions that delegate kwargs to other functions at runtime (#9791)

This commit is contained in:
Alex Waygood
2023-02-22 07:31:25 +00:00
committed by GitHub
parent 6ac15185fb
commit fbc092b4cd
7 changed files with 1394 additions and 1370 deletions

View File

@@ -55,49 +55,49 @@ def wrap(
text: str,
width: int = 70,
*,
initial_indent: str = ...,
subsequent_indent: str = ...,
expand_tabs: bool = ...,
tabsize: int = ...,
replace_whitespace: bool = ...,
fix_sentence_endings: bool = ...,
break_long_words: bool = ...,
break_on_hyphens: bool = ...,
drop_whitespace: bool = ...,
initial_indent: str = "",
subsequent_indent: str = "",
expand_tabs: bool = True,
tabsize: int = 8,
replace_whitespace: bool = True,
fix_sentence_endings: bool = False,
break_long_words: bool = True,
break_on_hyphens: bool = True,
drop_whitespace: bool = True,
max_lines: int | None = None,
placeholder: str = ...,
placeholder: str = " [...]",
) -> list[str]: ...
def fill(
text: str,
width: int = 70,
*,
initial_indent: str = ...,
subsequent_indent: str = ...,
expand_tabs: bool = ...,
tabsize: int = ...,
replace_whitespace: bool = ...,
fix_sentence_endings: bool = ...,
break_long_words: bool = ...,
break_on_hyphens: bool = ...,
drop_whitespace: bool = ...,
initial_indent: str = "",
subsequent_indent: str = "",
expand_tabs: bool = True,
tabsize: int = 8,
replace_whitespace: bool = True,
fix_sentence_endings: bool = False,
break_long_words: bool = True,
break_on_hyphens: bool = True,
drop_whitespace: bool = True,
max_lines: int | None = None,
placeholder: str = ...,
placeholder: str = " [...]",
) -> str: ...
def shorten(
text: str,
width: int,
*,
initial_indent: str = ...,
subsequent_indent: str = ...,
expand_tabs: bool = ...,
tabsize: int = ...,
replace_whitespace: bool = ...,
fix_sentence_endings: bool = ...,
break_long_words: bool = ...,
break_on_hyphens: bool = ...,
drop_whitespace: bool = ...,
initial_indent: str = "",
subsequent_indent: str = "",
expand_tabs: bool = True,
tabsize: int = 8,
replace_whitespace: bool = True,
fix_sentence_endings: bool = False,
break_long_words: bool = True,
break_on_hyphens: bool = True,
drop_whitespace: bool = True,
# Omit `max_lines: int = None`, it is forced to 1 here.
placeholder: str = ...,
placeholder: str = " [...]",
) -> str: ...
def dedent(text: str) -> str: ...
def indent(text: str, prefix: str, predicate: Callable[[str], bool] | None = None) -> str: ...