Add a structseq class to _typeshed (#6560)

Co-authored-by: Akuli <akuviljanen17@gmail.com>
This commit is contained in:
Alex Waygood
2021-12-17 21:42:09 +00:00
committed by GitHub
parent 183a43a7e0
commit 0b75d71303
16 changed files with 301 additions and 254 deletions

View File

@@ -1,15 +1,27 @@
from typing import NamedTuple
from _typeshed import structseq
from typing import Any, Tuple
from typing_extensions import final
class struct_spwd(NamedTuple):
sp_namp: str
sp_pwdp: str
sp_lstchg: int
sp_min: int
sp_max: int
sp_warn: int
sp_inact: int
sp_expire: int
sp_flag: int
@final
class struct_spwd(structseq[Any], Tuple[str, str, int, int, int, int, int, int, int]):
@property
def sp_namp(self) -> str: ...
@property
def sp_pwdp(self) -> str: ...
@property
def sp_lstchg(self) -> int: ...
@property
def sp_min(self) -> int: ...
@property
def sp_max(self) -> int: ...
@property
def sp_warn(self) -> int: ...
@property
def sp_inact(self) -> int: ...
@property
def sp_expire(self) -> int: ...
@property
def sp_flag(self) -> int: ...
def getspall() -> list[struct_spwd]: ...
def getspnam(__arg: str) -> struct_spwd: ...