Skip to content

Commit fe9f461

Browse files
Daverballmingyu.park
authored andcommitted
gevent: Remove remaining uses of Incomplete (python#14072)
1 parent 0a0d2c5 commit fe9f461

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

stubs/gevent/gevent/_util.pyi

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
from _typeshed import Incomplete
2-
from collections.abc import Callable, MutableMapping, Sequence
1+
from collections.abc import Callable, Iterable, MutableMapping, Sequence
32
from types import ModuleType
43
from typing import Any, Generic, TypeVar, overload
54
from typing_extensions import Self
@@ -13,7 +12,7 @@ def update_wrapper(wrapper: _T, wrapped: object, assigned: Sequence[str] = ...,
1312
def copy_globals(
1413
source: ModuleType,
1514
globs: MutableMapping[str, Any],
16-
only_names: Incomplete | None = None,
15+
only_names: Iterable[str] | None = None,
1716
ignore_missing_names: bool = False,
1817
names_to_ignore: Sequence[str] = ...,
1918
dunder_names_to_keep: Sequence[str] = ...,

stubs/gevent/gevent/os.pyi

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import os
22
import sys
3-
from _typeshed import FileDescriptor, Incomplete, ReadableBuffer
3+
from _typeshed import FileDescriptor, ReadableBuffer
44
from collections.abc import Callable
55
from typing import Literal
66

7+
from gevent._types import _ChildWatcher, _Loop
8+
79
def tp_read(fd: FileDescriptor, n: int) -> bytes: ...
810
def 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

Comments
 (0)