|
| 1 | +import sys |
1 | 2 | from _typeshed import structseq |
2 | 3 | from typing import Any |
3 | 4 | from typing_extensions import final |
4 | 5 |
|
5 | | -@final |
6 | | -class struct_passwd(structseq[Any], tuple[str, str, int, int, str, str, str]): |
7 | | - @property |
8 | | - def pw_name(self) -> str: ... |
9 | | - @property |
10 | | - def pw_passwd(self) -> str: ... |
11 | | - @property |
12 | | - def pw_uid(self) -> int: ... |
13 | | - @property |
14 | | - def pw_gid(self) -> int: ... |
15 | | - @property |
16 | | - def pw_gecos(self) -> str: ... |
17 | | - @property |
18 | | - def pw_dir(self) -> str: ... |
19 | | - @property |
20 | | - def pw_shell(self) -> str: ... |
| 6 | +if sys.platform != "win32": |
| 7 | + @final |
| 8 | + class struct_passwd(structseq[Any], tuple[str, str, int, int, str, str, str]): |
| 9 | + @property |
| 10 | + def pw_name(self) -> str: ... |
| 11 | + @property |
| 12 | + def pw_passwd(self) -> str: ... |
| 13 | + @property |
| 14 | + def pw_uid(self) -> int: ... |
| 15 | + @property |
| 16 | + def pw_gid(self) -> int: ... |
| 17 | + @property |
| 18 | + def pw_gecos(self) -> str: ... |
| 19 | + @property |
| 20 | + def pw_dir(self) -> str: ... |
| 21 | + @property |
| 22 | + def pw_shell(self) -> str: ... |
21 | 23 |
|
22 | | -def getpwall() -> list[struct_passwd]: ... |
23 | | -def getpwuid(__uid: int) -> struct_passwd: ... |
24 | | -def getpwnam(__name: str) -> struct_passwd: ... |
| 24 | + def getpwall() -> list[struct_passwd]: ... |
| 25 | + def getpwuid(__uid: int) -> struct_passwd: ... |
| 26 | + def getpwnam(__name: str) -> struct_passwd: ... |
0 commit comments