Update os.fspath(path: PathLike) to return Any since Union return types are troublesome

This commit is contained in:
Semyon Proshev
2017-03-21 15:00:46 +03:00
parent 99a1afd72b
commit 89de36afa4

View File

@@ -198,7 +198,7 @@ if sys.version_info >= (3, 6):
@overload
def fspath(path: bytes) -> bytes: ...
@overload
def fspath(path: PathLike) -> Union[str, bytes]: ...
def fspath(path: PathLike) -> Any: ...
def get_exec_path(env: Optional[Mapping[str, str]] = ...) -> List[str]: ...
# NOTE: get_exec_path(): returns List[bytes] when env not None