Add isjunction and splitroot functions (#10642)

This commit is contained in:
Nikita Sobolev
2023-08-31 15:14:22 +03:00
committed by GitHub
parent a4f08bd07f
commit 8a2019aa7f
3 changed files with 14 additions and 9 deletions

View File

@@ -42,6 +42,9 @@ from posixpath import (
splitext as splitext,
supports_unicode_filenames as supports_unicode_filenames,
)
if sys.version_info >= (3, 12):
from posixpath import isjunction as isjunction, splitroot as splitroot
from typing import AnyStr, overload
from typing_extensions import LiteralString
@@ -85,6 +88,8 @@ __all__ = [
"samestat",
"commonpath",
]
if sys.version_info >= (3, 12):
__all__ += ["isjunction", "splitroot"]
altsep: LiteralString