Add missing __match_args__ attributes to several unix-only structseq classes (#7587)

This commit is contained in:
Alex Waygood
2022-04-04 21:33:49 +01:00
committed by GitHub
parent be64b01e6c
commit 414f324083
6 changed files with 46 additions and 5 deletions

View File

@@ -1,11 +1,23 @@
import sys
from _typeshed import structseq
from typing import Any
from typing_extensions import final
from typing_extensions import Final, final
if sys.platform != "win32":
@final
class struct_spwd(structseq[Any], tuple[str, str, int, int, int, int, int, int, int]):
if sys.version_info >= (3, 10):
__match_args__: Final = (
"sp_namp",
"sp_pwdp",
"sp_lstchg",
"sp_min",
"sp_max",
"sp_warn",
"sp_inact",
"sp_expire",
"sp_flag",
)
@property
def sp_namp(self) -> str: ...
@property