diff --git a/stdlib/2.7/pprint.pyi b/stdlib/2.7/pprint.pyi index 2eb27d6ad123..4c9819ab2c45 100644 --- a/stdlib/2.7/pprint.pyi +++ b/stdlib/2.7/pprint.pyi @@ -4,7 +4,7 @@ from typing import IO, Any -def pprint(object: Any, stream: IO[Any] = ..., indent: int = ..., width: int = ..., +def pprint(object: Any, stream: IO[str] = ..., indent: int = ..., width: int = ..., depth: int = ...) -> None: ... def pformat(object, indent=..., width=..., depth=...): ... def saferepr(object): ... @@ -13,7 +13,7 @@ def isrecursive(object): ... class PrettyPrinter: def __init__(self, indent: int = ..., width: int = ..., depth: int = ..., - stream: IO[Any] = ...) -> None: ... + stream: IO[str] = ...) -> None: ... def pprint(self, object): ... def pformat(self, object): ... def isrecursive(self, object): ... diff --git a/stdlib/3/pprint.pyi b/stdlib/3/pprint.pyi index 95804e9643f9..b846ff90596f 100644 --- a/stdlib/3/pprint.pyi +++ b/stdlib/3/pprint.pyi @@ -2,11 +2,11 @@ # Based on http://docs.python.org/3.2/library/pprint.html -from typing import Any, Dict, Tuple, TextIO +from typing import Any, Dict, Tuple, IO def pformat(o: object, indent: int = ..., width: int = ..., depth: int = ...) -> str: ... -def pprint(o: object, stream: TextIO = ..., indent: int = ..., width: int = ..., +def pprint(o: object, stream: IO[str] = ..., indent: int = ..., width: int = ..., depth: int = ...) -> None: ... def isreadable(o: object) -> bool: ... def isrecursive(o: object) -> bool: ... @@ -14,7 +14,7 @@ def saferepr(o: object) -> str: ... class PrettyPrinter: def __init__(self, indent: int = ..., width: int = ..., depth: int = ..., - stream: TextIO = ...) -> None: ... + stream: IO[str] = ...) -> None: ... def pformat(self, o: object) -> str: ... def pprint(self, o: object) -> None: ... def isreadable(self, o: object) -> bool: ...