Support PathLike argument to os.path.split (#1588)

This commit is contained in:
Zack Hsi
2017-09-05 20:04:55 -07:00
committed by Jelle Zijlstra
parent fd8be43044
commit a4285af4c2

View File

@@ -92,7 +92,10 @@ def sameopenfile(fp1: int, fp2: int) -> bool: ...
# def samestat(stat1: stat_result,
# stat2: stat_result) -> bool: ... # Unix only
def split(path: AnyStr) -> Tuple[AnyStr, AnyStr]: ...
if sys.version_info >= (3, 6):
def split(path: Union[AnyStr, _PathLike[AnyStr]]) -> Tuple[AnyStr, AnyStr]: ...
else:
def split(path: AnyStr) -> Tuple[AnyStr, AnyStr]: ...
def splitdrive(path: AnyStr) -> Tuple[AnyStr, AnyStr]: ...
def splitext(path: AnyStr) -> Tuple[AnyStr, AnyStr]: ...