PurePath.parent[s] should be properties (#706)

PurePath.parent[s] should be properties
This commit is contained in:
Guido van Rossum
2016-11-28 14:01:22 -08:00
committed by Łukasz Langa
parent 33c0134b70
commit bbbf1d8c7a

View File

@@ -3,7 +3,7 @@
from typing import Any, Generator, IO, Optional, Sequence, Tuple, Type, TypeVar, Union
import os
_P = TypeVar('_P', 'PurePath')
_P = TypeVar('_P', bound='PurePath')
class PurePath:
parts = ... # type: Tuple[str, ...]
@@ -31,7 +31,9 @@ class PurePath:
def with_name(self: _P, name: str) -> _P: ...
def with_suffix(self: _P, suffix: str) -> _P: ...
def joinpath(self: _P, *other: Union[str, PurePath]) -> _P: ...
@property
def parents(self: _P) -> Sequence[_P]: ...
@property
def parent(self: _P) -> _P: ...
class PurePosixPath(PurePath): ...