Commit 97023cab authored by Benjamin Peterson's avatar Benjamin Peterson

add annotations to open()

parent 388737af
......@@ -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.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment