Convert namedtuples to class syntax (#3321)

This commit is contained in:
Sebastian Rittau
2019-10-20 10:37:33 +02:00
committed by GitHub
parent 2b9dc7b9c2
commit ec7960a8cb
41 changed files with 397 additions and 383 deletions

View File

@@ -1,14 +1,15 @@
from typing import List, NamedTuple
struct_spwd = NamedTuple("struct_spwd", [("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)])
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
def getspall() -> List[struct_spwd]: ...
def getspnam(name: str) -> struct_spwd: ...