From db1316d26b467e0752da2aa91876c8107d97b567 Mon Sep 17 00:00:00 2001 From: "Michael J. Sullivan" Date: Thu, 24 May 2018 13:23:17 -0700 Subject: [PATCH] os.path.relpath can use a default argument and still use str (#2159) --- stdlib/2/os/path.pyi | 2 +- stdlib/3/os/path.pyi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/stdlib/2/os/path.pyi b/stdlib/2/os/path.pyi index b776cbe2a..56106428b 100644 --- a/stdlib/2/os/path.pyi +++ b/stdlib/2/os/path.pyi @@ -141,7 +141,7 @@ else: def join(path: AnyStr, *paths: AnyStr) -> AnyStr: ... @overload -def relpath(path: _BytesPath, start: _BytesPath) -> bytes: ... # type: ignore +def relpath(path: _BytesPath, start: Optional[_BytesPath] = ...) -> bytes: ... # type: ignore @overload def relpath(path: _StrPath, start: Optional[_StrPath] = ...) -> Text: ... diff --git a/stdlib/3/os/path.pyi b/stdlib/3/os/path.pyi index b776cbe2a..56106428b 100644 --- a/stdlib/3/os/path.pyi +++ b/stdlib/3/os/path.pyi @@ -141,7 +141,7 @@ else: def join(path: AnyStr, *paths: AnyStr) -> AnyStr: ... @overload -def relpath(path: _BytesPath, start: _BytesPath) -> bytes: ... # type: ignore +def relpath(path: _BytesPath, start: Optional[_BytesPath] = ...) -> bytes: ... # type: ignore @overload def relpath(path: _StrPath, start: Optional[_StrPath] = ...) -> Text: ...