From f28691261a9d1e1a7d4d4a74235dcca2e6a89020 Mon Sep 17 00:00:00 2001 From: Lawrence Chan Date: Sun, 20 Oct 2019 14:14:02 -0500 Subject: [PATCH] Change pprint depth type to Optional[int] (#3392) --- stdlib/2and3/pprint.pyi | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/stdlib/2and3/pprint.pyi b/stdlib/2and3/pprint.pyi index 90a87ab0f..cd9eb237b 100644 --- a/stdlib/2and3/pprint.pyi +++ b/stdlib/2and3/pprint.pyi @@ -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: ...