Skip to content

Commit a9f6632

Browse files
authored
multiprocessing.reduction: improve recvfds and recv_handle (#8422)
1 parent 26d0935 commit a9f6632

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

stdlib/multiprocessing/reduction.pyi

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import pickle
22
import sys
3+
from _typeshed import HasFileno
34
from abc import ABCMeta
45
from copyreg import _DispatchTableType
6+
from socket import socket
57
from typing import Any
68
from typing_extensions import Literal
79

@@ -43,9 +45,9 @@ else:
4345
else:
4446
ACKNOWLEDGE: Literal[False]
4547

46-
def recvfds(sock, size): ...
48+
def recvfds(sock: socket, size: int) -> list[int]: ...
4749
def send_handle(conn, handle, destination_pid) -> None: ...
48-
def recv_handle(conn) -> None: ...
50+
def recv_handle(conn: HasFileno) -> int: ...
4951
def sendfds(sock, fds) -> None: ...
5052
def DupFd(fd): ...
5153

0 commit comments

Comments
 (0)