mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 21:46:42 +08:00
Update stub for spwd (#1372)
Update stub for spwd
- Use `NamedTuple`
- Fix stub for Python 3
- Some attributes are changed from Python 2
- `sp_nam` -> `sp_namp`
- `sp_pwd` -> `sp_pwdp`
This commit is contained in:
committed by
Guido van Rossum
parent
6f07424246
commit
193e6885d4
14
stdlib/2/spwd.pyi
Normal file
14
stdlib/2/spwd.pyi
Normal file
@@ -0,0 +1,14 @@
|
||||
from typing import List, NamedTuple
|
||||
|
||||
struct_spwd = NamedTuple("struct_spwd", [("sp_nam", str),
|
||||
("sp_pwd", 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: ...
|
||||
Reference in New Issue
Block a user