Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions stdlib/pathlib/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ class PurePath(PathLike[str]):
if sys.version_info >= (3, 14):
def is_relative_to(self, other: StrPath) -> bool: ...
elif sys.version_info >= (3, 12):
@overload
def is_relative_to(self, other: StrPath, /) -> bool: ...
@overload
@deprecated("Passing additional arguments is deprecated since Python 3.12; removed in Python 3.14.")
def is_relative_to(self, other: StrPath, /, *_deprecated: StrPath) -> bool: ...
else:
def is_relative_to(self, *other: StrPath) -> bool: ...
Expand All @@ -116,6 +120,10 @@ class PurePath(PathLike[str]):
if sys.version_info >= (3, 14):
def relative_to(self, other: StrPath, *, walk_up: bool = False) -> Self: ...
elif sys.version_info >= (3, 12):
@overload
def relative_to(self, other: StrPath, /, *, walk_up: bool = False) -> Self: ...
@overload
@deprecated("Passing additional arguments is deprecated since Python 3.12; removed in Python 3.14.")
def relative_to(self, other: StrPath, /, *_deprecated: StrPath, walk_up: bool = False) -> Self: ...
else:
def relative_to(self, *other: StrPath) -> Self: ...
Expand Down