mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-06 21:43:59 +08:00
[pathlib] Deprecate additional arguments (#15228)
This commit is contained in:
@@ -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: ...
|
||||
@@ -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: ...
|
||||
|
||||
Reference in New Issue
Block a user