mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-06 20:24:30 +08:00
PurePath.parent[s] should be properties (#706)
PurePath.parent[s] should be properties
This commit is contained in:
committed by
Łukasz Langa
parent
33c0134b70
commit
bbbf1d8c7a
@@ -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): ...
|
||||
|
||||
Reference in New Issue
Block a user