mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-06 21:43:59 +08:00
Fix stdlib stubtest for latest Python patch releases (#14220)
This commit is contained in:
+7
-10
@@ -1,6 +1,8 @@
|
||||
import sys
|
||||
from _typeshed import BytesPath, StrOrBytesPath, StrPath
|
||||
from genericpath import (
|
||||
ALLOW_MISSING as ALLOW_MISSING,
|
||||
_AllowMissingType,
|
||||
commonprefix as commonprefix,
|
||||
exists as exists,
|
||||
getatime as getatime,
|
||||
@@ -89,6 +91,7 @@ __all__ = [
|
||||
"sameopenfile",
|
||||
"samestat",
|
||||
"commonpath",
|
||||
"ALLOW_MISSING",
|
||||
]
|
||||
if sys.version_info >= (3, 12):
|
||||
__all__ += ["isjunction", "splitroot"]
|
||||
@@ -108,16 +111,10 @@ def join(path: StrPath, /, *paths: StrPath) -> str: ...
|
||||
def join(path: BytesPath, /, *paths: BytesPath) -> bytes: ...
|
||||
|
||||
if sys.platform == "win32":
|
||||
if sys.version_info >= (3, 10):
|
||||
@overload
|
||||
def realpath(path: PathLike[AnyStr], *, strict: bool = False) -> AnyStr: ...
|
||||
@overload
|
||||
def realpath(path: AnyStr, *, strict: bool = False) -> AnyStr: ...
|
||||
else:
|
||||
@overload
|
||||
def realpath(path: PathLike[AnyStr]) -> AnyStr: ...
|
||||
@overload
|
||||
def realpath(path: AnyStr) -> AnyStr: ...
|
||||
@overload
|
||||
def realpath(path: PathLike[AnyStr], *, strict: bool | _AllowMissingType = False) -> AnyStr: ...
|
||||
@overload
|
||||
def realpath(path: AnyStr, *, strict: bool | _AllowMissingType = False) -> AnyStr: ...
|
||||
|
||||
else:
|
||||
realpath = abspath
|
||||
|
||||
Reference in New Issue
Block a user