Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9990e8c

Browse files
committed
add annotations to open()
1 parent 67d28f7 commit 9990e8c

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

Lib/_pyio.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,9 @@ def __init__(self, errno, strerror, characters_written=0):
3535
self.characters_written = characters_written
3636

3737

38-
def open(file, mode="r", buffering=None, encoding=None, errors=None,
39-
newline=None, closefd=True):
38+
def open(file: (str, bytes), mode: str = "r", buffering: int = None,
39+
encoding: str = None, errors: str = None,
40+
newline: str = None, closefd: bool = True) -> "IOBase":
4041

4142
r"""Open file and return a stream. Raise IOError upon failure.
4243

0 commit comments

Comments
 (0)