os.fsencode(PathLike[AnyStr]) produces AnyStr (#4233)

PathLike is generic over AnyStr of 7587e7f1c1. Also see 89de36afa4, which changed this to `Any` before `AnyStr` was available.
This commit is contained in:
Martijn Pieters
2020-06-16 23:57:58 +01:00
committed by GitHub
parent 51cf2f51b8
commit 5c739ef4c3

View File

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