diff --git a/stdlib/2/os/path.pyi b/stdlib/2/os/path.pyi index 78e21a3f96a5..037928c68194 100644 --- a/stdlib/2/os/path.pyi +++ b/stdlib/2/os/path.pyi @@ -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, diff --git a/stdlib/3/os/path.pyi b/stdlib/3/os/path.pyi index 78e21a3f96a5..037928c68194 100644 --- a/stdlib/3/os/path.pyi +++ b/stdlib/3/os/path.pyi @@ -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,