mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-22 03:41:28 +08:00
stdlib: add argument default values (#9501)
This commit is contained in:
@@ -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: ...
|
||||
|
||||
Reference in New Issue
Block a user