stdlib: fix many attributes which are read-only at runtime but read-write in the stub (#7395)

This commit is contained in:
Alex Waygood
2022-02-28 00:23:09 +00:00
committed by GitHub
parent 46da0b87ea
commit a0b41959ec
17 changed files with 104 additions and 50 deletions

View File

@@ -20,14 +20,22 @@ if sys.version_info >= (3, 9):
__all__ = ["PurePath", "PurePosixPath", "PureWindowsPath", "Path", "PosixPath", "WindowsPath"]
class PurePath(PathLike[str]):
parts: tuple[str, ...]
drive: str
root: str
anchor: str
name: str
suffix: str
suffixes: list[str]
stem: str
@property
def parts(self) -> tuple[str, ...]: ...
@property
def drive(self) -> str: ...
@property
def root(self) -> str: ...
@property
def anchor(self) -> str: ...
@property
def name(self) -> str: ...
@property
def suffix(self) -> str: ...
@property
def suffixes(self) -> list[str]: ...
@property
def stem(self) -> str: ...
def __new__(cls: type[Self], *args: StrPath) -> Self: ...
def __hash__(self) -> int: ...
def __eq__(self, other: object) -> bool: ...