mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 12:44:28 +08:00
Use custom tuple subclass for pwd.struct_passwd (#3017)
This commit is contained in:
committed by
Sebastian Rittau
parent
a7785151aa
commit
d6e2b02f72
@@ -1,12 +1,13 @@
|
||||
from typing import List, NamedTuple
|
||||
from typing import List, Tuple
|
||||
|
||||
struct_passwd = NamedTuple("struct_passwd", [("pw_name", str),
|
||||
("pw_passwd", str),
|
||||
("pw_uid", int),
|
||||
("pw_gid", int),
|
||||
("pw_gecos", str),
|
||||
("pw_dir", str),
|
||||
("pw_shell", str)])
|
||||
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
|
||||
|
||||
def getpwall() -> List[struct_passwd]: ...
|
||||
def getpwuid(uid: int) -> struct_passwd: ...
|
||||
|
||||
Reference in New Issue
Block a user