diff --git a/Lib/_pyio.py b/Lib/_pyio.py index 3fd1afedde7..0ef6822044d 100644 --- a/Lib/_pyio.py +++ b/Lib/_pyio.py @@ -35,8 +35,9 @@ class BlockingIOError(IOError): self.characters_written = characters_written -def open(file, mode="r", buffering=None, encoding=None, errors=None, - newline=None, closefd=True): +def open(file: (str, bytes), mode: str = "r", buffering: int = None, + encoding: str = None, errors: str = None, + newline: str = None, closefd: bool = True) -> "IOBase": r"""Open file and return a stream. Raise IOError upon failure.