mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-27 12:02:19 +08:00
Add a structseq class to _typeshed (#6560)
Co-authored-by: Akuli <akuviljanen17@gmail.com>
This commit is contained in:
@@ -1,17 +1,23 @@
|
||||
from typing import ClassVar, Tuple
|
||||
from _typeshed import structseq
|
||||
from typing import Any, Tuple
|
||||
from typing_extensions import final
|
||||
|
||||
class struct_passwd(Tuple[str, str, int, int, str, str, str]):
|
||||
pw_name: str
|
||||
pw_passwd: str
|
||||
pw_uid: int
|
||||
pw_gid: int
|
||||
pw_gecos: str
|
||||
pw_dir: str
|
||||
pw_shell: str
|
||||
|
||||
n_fields: ClassVar[int]
|
||||
n_sequence_fields: ClassVar[int]
|
||||
n_unnamed_fields: ClassVar[int]
|
||||
@final
|
||||
class struct_passwd(structseq[Any], Tuple[str, str, int, int, str, str, str]):
|
||||
@property
|
||||
def pw_name(self) -> str: ...
|
||||
@property
|
||||
def pw_passwd(self) -> str: ...
|
||||
@property
|
||||
def pw_uid(self) -> int: ...
|
||||
@property
|
||||
def pw_gid(self) -> int: ...
|
||||
@property
|
||||
def pw_gecos(self) -> str: ...
|
||||
@property
|
||||
def pw_dir(self) -> str: ...
|
||||
@property
|
||||
def pw_shell(self) -> str: ...
|
||||
|
||||
def getpwall() -> list[struct_passwd]: ...
|
||||
def getpwuid(__uid: int) -> struct_passwd: ...
|
||||
|
||||
Reference in New Issue
Block a user