textwrap: various fixes (#3819)

This commit is contained in:
Shantanu
2020-03-06 02:12:24 -08:00
committed by GitHub
parent 3c770a7a17
commit af09df9b48
2 changed files with 3 additions and 6 deletions

View File

@@ -21,7 +21,7 @@ class TextWrapper:
whitespace_trans: str = ...
unicode_whitespace_trans: Dict[int, int] = ...
uspace: int = ...
x: int = ...
x: str = ... # leaked loop variable
def __init__(
self,
@@ -53,7 +53,7 @@ class TextWrapper:
def wrap(
text: str = ...,
text: str,
width: int = ...,
*,
initial_indent: str = ...,
@@ -109,5 +109,5 @@ def shorten(
def dedent(text: str) -> str:
...
def indent(text: str, prefix: str, predicate: Callable[[str], bool] = ...) -> str:
def indent(text: str, prefix: str, predicate: Optional[Callable[[str], bool]] = ...) -> str:
...

View File

@@ -726,9 +726,6 @@ tempfile.SpooledTemporaryFile.__next__
tempfile.SpooledTemporaryFile.readable
tempfile.SpooledTemporaryFile.seekable
tempfile.SpooledTemporaryFile.writable
textwrap.TextWrapper.x
textwrap.indent
textwrap.wrap
threading.BoundedSemaphore.__enter__
threading.BoundedSemaphore.acquire
threading.Condition.acquire