mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
Add isjunction and splitroot functions (#10642)
This commit is contained in:
@@ -58,6 +58,8 @@ __all__ = [
|
||||
"relpath",
|
||||
"commonpath",
|
||||
]
|
||||
if sys.version_info >= (3, 12):
|
||||
__all__ += ["isjunction", "splitroot"]
|
||||
|
||||
supports_unicode_filenames: bool
|
||||
# aliases (also in os)
|
||||
@@ -150,3 +152,10 @@ def isabs(s: StrOrBytesPath) -> bool: ...
|
||||
def islink(path: FileDescriptorOrPath) -> bool: ...
|
||||
def ismount(path: FileDescriptorOrPath) -> bool: ...
|
||||
def lexists(path: FileDescriptorOrPath) -> bool: ...
|
||||
|
||||
if sys.version_info >= (3, 12):
|
||||
def isjunction(path: StrOrBytesPath) -> bool: ...
|
||||
@overload
|
||||
def splitroot(p: AnyOrLiteralStr) -> tuple[AnyOrLiteralStr, AnyOrLiteralStr, AnyOrLiteralStr]: ...
|
||||
@overload
|
||||
def splitroot(p: PathLike[AnyStr]) -> tuple[AnyStr, AnyStr, AnyStr]: ...
|
||||
|
||||
Reference in New Issue
Block a user