Use PEP 570 syntax in stdlib (#11250)

This commit is contained in:
Shantanu
2024-03-09 14:50:16 -08:00
committed by GitHub
parent 63737acac6
commit 470a13ab09
139 changed files with 2412 additions and 2371 deletions

View File

@@ -59,7 +59,7 @@ class PurePath(PathLike[str]):
def is_absolute(self) -> bool: ...
def is_reserved(self) -> bool: ...
if sys.version_info >= (3, 12):
def is_relative_to(self, __other: StrPath, *_deprecated: StrPath) -> bool: ...
def is_relative_to(self, other: StrPath, /, *_deprecated: StrPath) -> bool: ...
elif sys.version_info >= (3, 9):
def is_relative_to(self, *other: StrPath) -> bool: ...
@@ -69,7 +69,7 @@ class PurePath(PathLike[str]):
def match(self, path_pattern: str) -> bool: ...
if sys.version_info >= (3, 12):
def relative_to(self, __other: StrPath, *_deprecated: StrPath, walk_up: bool = False) -> Self: ...
def relative_to(self, other: StrPath, /, *_deprecated: StrPath, walk_up: bool = False) -> Self: ...
else:
def relative_to(self, *other: StrPath) -> Self: ...