mirror of https://github.com/python/cpython
add annotations to open()
This commit is contained in:
parent
67d28f774d
commit
9990e8c264
|
@ -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.
|
||||
|
||||
|
|
Loading…
Reference in New Issue