os.path.exists (Py 3) accepts a file descriptor (#2451)

Closes #1653
This commit is contained in:
Sebastian Rittau
2018-09-24 16:53:44 +02:00
committed by Jelle Zijlstra
parent cca6ee43e6
commit ea2122741f
2 changed files with 8 additions and 2 deletions

View File

@@ -100,7 +100,10 @@ elif sys.version_info >= (3, 5):
# So, fall back to Any
def commonprefix(list: Sequence[_PathType]) -> Any: ...
def exists(path: _PathType) -> bool: ...
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,

View File

@@ -100,7 +100,10 @@ elif sys.version_info >= (3, 5):
# So, fall back to Any
def commonprefix(list: Sequence[_PathType]) -> Any: ...
def exists(path: _PathType) -> bool: ...
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,