Skip to content

Commit 3edfd90

Browse files
authored
Improve return types of os.wait3 and os.wait4 (#11194)
1 parent 07d1d2a commit 3edfd90

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

stdlib/os/__init__.pyi

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ from . import path as _path
3333
if sys.version_info >= (3, 9):
3434
from types import GenericAlias
3535

36+
if sys.platform != "win32":
37+
from resource import struct_rusage
38+
3639
# This unnecessary alias is to work around various errors
3740
path = _path
3841

@@ -962,8 +965,8 @@ else:
962965

963966
def waitid(__idtype: int, __ident: int, __options: int) -> waitid_result | None: ...
964967

965-
def wait3(options: int) -> tuple[int, int, Any]: ...
966-
def wait4(pid: int, options: int) -> tuple[int, int, Any]: ...
968+
def wait3(options: int) -> tuple[int, int, struct_rusage]: ...
969+
def wait4(pid: int, options: int) -> tuple[int, int, struct_rusage]: ...
967970
def WCOREDUMP(__status: int) -> bool: ...
968971
def WIFCONTINUED(status: int) -> bool: ...
969972
def WIFSTOPPED(status: int) -> bool: ...

0 commit comments

Comments
 (0)