11import os
22import sys
3- from _typeshed import FileDescriptor , Incomplete , ReadableBuffer
3+ from _typeshed import FileDescriptor , ReadableBuffer
44from collections .abc import Callable
55from typing import Literal
66
7+ from gevent ._types import _ChildWatcher , _Loop
8+
79def tp_read (fd : FileDescriptor , n : int ) -> bytes : ...
810def tp_write (fd : FileDescriptor , buf : ReadableBuffer ) -> int : ...
911
@@ -17,11 +19,14 @@ if sys.platform != "win32":
1719 def forkpty_gevent () -> tuple [int , int ]: ...
1820 waitpid = os .waitpid
1921 def fork_and_watch (
20- callback : Incomplete | None = None , loop : Incomplete | None = None , ref : bool = False , fork : Callable [[], int ] = ...
22+ callback : Callable [[_ChildWatcher ], object ] | None = None ,
23+ loop : _Loop | None = None ,
24+ ref : bool = False ,
25+ fork : Callable [[], int ] = ...,
2126 ) -> int : ...
2227 def forkpty_and_watch (
23- callback : Incomplete | None = None ,
24- loop : Incomplete | None = None ,
28+ callback : Callable [[ _ChildWatcher ], object ] | None = None ,
29+ loop : _Loop | None = None ,
2530 ref : bool = False ,
2631 forkpty : Callable [[], tuple [int , int ]] = ...,
2732 ) -> tuple [int , int ]: ...
0 commit comments