Skip to content

Commit 5e1dec9

Browse files
authored
pwd is not available on Windows
Refs python#6734
1 parent ff6d084 commit 5e1dec9

1 file changed

Lines changed: 21 additions & 19 deletions

File tree

‎stdlib/pwd.pyi‎

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,26 @@
1+
import sys
12
from _typeshed import structseq
23
from typing import Any
34
from typing_extensions import final
45

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: ...
2123

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

Comments
 (0)