mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 05:51:52 +08:00
Add an optional opener parameter to open() function (#2977)
Fixes #2976
This commit is contained in:
committed by
Sebastian Rittau
parent
c03100230d
commit
75723e3885
@@ -1315,10 +1315,12 @@ def oct(__i: int) -> str: ... # TODO __index__
|
||||
|
||||
if sys.version_info >= (3, 6):
|
||||
def open(file: Union[str, bytes, int, _PathLike], mode: str = ..., buffering: int = ..., encoding: Optional[str] = ...,
|
||||
errors: Optional[str] = ..., newline: Optional[str] = ..., closefd: bool = ...) -> IO[Any]: ...
|
||||
errors: Optional[str] = ..., newline: Optional[str] = ..., closefd: bool = ...,
|
||||
opener: Optional[Callable[[str, int], int]] = ...) -> IO[Any]: ...
|
||||
elif sys.version_info >= (3,):
|
||||
def open(file: Union[str, bytes, int], mode: str = ..., buffering: int = ..., encoding: Optional[str] = ...,
|
||||
errors: Optional[str] = ..., newline: Optional[str] = ..., closefd: bool = ...) -> IO[Any]: ...
|
||||
errors: Optional[str] = ..., newline: Optional[str] = ..., closefd: bool = ...,
|
||||
opener: Optional[Callable[[str, int], int]] = ...) -> IO[Any]: ...
|
||||
else:
|
||||
def open(name: Union[unicode, int], mode: unicode = ..., buffering: int = ...) -> BinaryIO: ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user