mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 21:14:48 +08:00
Update stubs for pathlib.PurePath and pathlib.Path classes due to PEP-519.
This commit is contained in:
@@ -22,8 +22,10 @@ class PurePath(_PurePathBase):
|
||||
stem = ... # type: str
|
||||
if sys.version_info < (3, 5):
|
||||
def __init__(self, *pathsegments: str) -> None: ...
|
||||
else:
|
||||
elif sys.version_info < (3, 6):
|
||||
def __new__(cls: Type[_P], *args: Union[str, PurePath]) -> _P: ...
|
||||
else:
|
||||
def __new__(cls: Type[_P], *args: Union[str, os.PathLike]) -> _P: ...
|
||||
def __hash__(self) -> int: ...
|
||||
def __lt__(self, other: PurePath) -> bool: ...
|
||||
def __le__(self, other: PurePath) -> bool: ...
|
||||
@@ -93,8 +95,12 @@ class Path(PurePath):
|
||||
if sys.version_info >= (3, 5):
|
||||
@classmethod
|
||||
def home(cls: Type[_P]) -> _P: ...
|
||||
def __new__(cls: Type[_P], *args: Union[str, PurePath],
|
||||
**kwargs: Any) -> _P: ...
|
||||
if sys.version_info < (3, 6):
|
||||
def __new__(cls: Type[_P], *args: Union[str, PurePath],
|
||||
**kwargs: Any) -> _P: ...
|
||||
else:
|
||||
def __new__(cls: Type[_P], *args: Union[str, os.PathLike],
|
||||
**kwargs: Any) -> _P: ...
|
||||
|
||||
def absolute(self: _P) -> _P: ...
|
||||
def expanduser(self: _P) -> _P: ...
|
||||
|
||||
Reference in New Issue
Block a user