Add PathLike to genericpath.exists and re-export (#3897)

Closes#3492
This commit is contained in:
Debjyoti Biswas
2020-04-02 13:21:59 +05:30
committed by GitHub
parent cb87bd1f53
commit f4a646d43c
6 changed files with 11 additions and 23 deletions

View File

@@ -5,6 +5,7 @@
import os
import sys
from typing import overload, List, Any, AnyStr, Sequence, Tuple, TypeVar, Union, Text, Callable, Optional
from genericpath import exists as exists
_T = TypeVar('_T')
@@ -100,10 +101,6 @@ elif sys.version_info >= (3, 5):
# So, fall back to Any
def commonprefix(m: Sequence[_PathType]) -> Any: ...
if sys.version_info >= (3, 3):
def exists(path: Union[_PathType, int]) -> bool: ...
else:
def exists(path: _PathType) -> bool: ...
def lexists(path: _PathType) -> bool: ...
# These return float if os.stat_float_times() == True,