@@ -104,6 +104,10 @@ class PurePath(PathLike[str]):
104104 if sys .version_info >= (3 , 14 ):
105105 def is_relative_to (self , other : StrPath ) -> bool : ...
106106 elif sys .version_info >= (3 , 12 ):
107+ @overload
108+ def is_relative_to (self , other : StrPath , / ) -> bool : ...
109+ @overload
110+ @deprecated ("Passing additional arguments is deprecated since Python 3.12; removed in Python 3.14." )
107111 def is_relative_to (self , other : StrPath , / , * _deprecated : StrPath ) -> bool : ...
108112 else :
109113 def is_relative_to (self , * other : StrPath ) -> bool : ...
@@ -116,6 +120,10 @@ class PurePath(PathLike[str]):
116120 if sys .version_info >= (3 , 14 ):
117121 def relative_to (self , other : StrPath , * , walk_up : bool = False ) -> Self : ...
118122 elif sys .version_info >= (3 , 12 ):
123+ @overload
124+ def relative_to (self , other : StrPath , / , * , walk_up : bool = False ) -> Self : ...
125+ @overload
126+ @deprecated ("Passing additional arguments is deprecated since Python 3.12; removed in Python 3.14." )
119127 def relative_to (self , other : StrPath , / , * _deprecated : StrPath , walk_up : bool = False ) -> Self : ...
120128 else :
121129 def relative_to (self , * other : StrPath ) -> Self : ...
0 commit comments