Allow os.readlink to accept path-like objects (#1441)

This commit is contained in:
Rhys Parry
2017-06-30 22:00:36 -07:00
committed by Jelle Zijlstra
parent 683c6e90a0
commit 9e7953515d

View File

@@ -323,7 +323,10 @@ def mkdir(path: _PathType, mode: int = ...) -> None: ...
def makedirs(path: _PathType, mode: int = ...,
exist_ok: bool = ...) -> None: ...
def pathconf(path: _PathType, name: Union[str, int]) -> int: ... # Unix only
def readlink(path: AnyStr) -> AnyStr: ...
if sys.version_info >= (3, 6):
def readlink(path: Union[AnyStr, PathLike[AnyStr]]) -> AnyStr: ...
else:
def readlink(path: AnyStr) -> AnyStr: ...
def remove(path: _PathType) -> None: ...
def removedirs(path: _PathType) -> None: ...
def rename(src: _PathType, dst: _PathType) -> None: ...