Change pprint depth type to Optional[int] (#3392)

This commit is contained in:
Lawrence Chan
2019-10-20 14:14:02 -05:00
committed by Jelle Zijlstra
parent ec7960a8cb
commit f28691261a

View File

@@ -4,21 +4,21 @@
# Based on http://docs.python.org/3/library/pprint.html
import sys
from typing import Any, Dict, Tuple, IO
from typing import Any, Dict, Tuple, IO, Optional
if sys.version_info >= (3, 4):
def pformat(o: object, indent: int = ..., width: int = ...,
depth: int = ..., compact: bool = ...) -> str: ...
depth: Optional[int] = ..., compact: bool = ...) -> str: ...
else:
def pformat(o: object, indent: int = ..., width: int = ...,
depth: int = ...) -> str: ...
depth: Optional[int] = ...) -> str: ...
if sys.version_info >= (3, 4):
def pprint(o: object, stream: IO[str] = ..., indent: int = ..., width: int = ...,
depth: int = ..., compact: bool = ...) -> None: ...
depth: Optional[int] = ..., compact: bool = ...) -> None: ...
else:
def pprint(o: object, stream: IO[str] = ..., indent: int = ..., width: int = ...,
depth: int = ...) -> None: ...
depth: Optional[int] = ...) -> None: ...
def isreadable(o: object) -> bool: ...
def isrecursive(o: object) -> bool: ...
@@ -26,10 +26,10 @@ def saferepr(o: object) -> str: ...
class PrettyPrinter:
if sys.version_info >= (3, 4):
def __init__(self, indent: int = ..., width: int = ..., depth: int = ...,
def __init__(self, indent: int = ..., width: int = ..., depth: Optional[int] = ...,
stream: IO[str] = ..., compact: bool = ...) -> None: ...
else:
def __init__(self, indent: int = ..., width: int = ..., depth: int = ...,
def __init__(self, indent: int = ..., width: int = ..., depth: Optional[int] = ...,
stream: IO[str] = ...) -> None: ...
def pformat(self, o: object) -> str: ...