Skip to content

Commit bbbf1d8

Browse files
gvanrossumambv
authored andcommitted
PurePath.parent[s] should be properties (#706)
PurePath.parent[s] should be properties
1 parent 33c0134 commit bbbf1d8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

stdlib/3.5/pathlib.pyi

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from typing import Any, Generator, IO, Optional, Sequence, Tuple, Type, TypeVar, Union
44
import os
55

6-
_P = TypeVar('_P', 'PurePath')
6+
_P = TypeVar('_P', bound='PurePath')
77

88
class PurePath:
99
parts = ... # type: Tuple[str, ...]
@@ -31,7 +31,9 @@ class PurePath:
3131
def with_name(self: _P, name: str) -> _P: ...
3232
def with_suffix(self: _P, suffix: str) -> _P: ...
3333
def joinpath(self: _P, *other: Union[str, PurePath]) -> _P: ...
34+
@property
3435
def parents(self: _P) -> Sequence[_P]: ...
36+
@property
3537
def parent(self: _P) -> _P: ...
3638

3739
class PurePosixPath(PurePath): ...

0 commit comments

Comments
 (0)