gevent: Remove remaining uses of Incomplete (#14072)

This commit is contained in:
David Salvisberg
2025-05-15 12:35:12 +02:00
committed by GitHub
parent 1063db7c15
commit 23156388e4
2 changed files with 11 additions and 7 deletions
+2 -3
View File
@@ -1,5 +1,4 @@
from _typeshed import Incomplete
from collections.abc import Callable, MutableMapping, Sequence
from collections.abc import Callable, Iterable, MutableMapping, Sequence
from types import ModuleType
from typing import Any, Generic, TypeVar, overload
from typing_extensions import Self
@@ -13,7 +12,7 @@ def update_wrapper(wrapper: _T, wrapped: object, assigned: Sequence[str] = ...,
def copy_globals(
source: ModuleType,
globs: MutableMapping[str, Any],
only_names: Incomplete | None = None,
only_names: Iterable[str] | None = None,
ignore_missing_names: bool = False,
names_to_ignore: Sequence[str] = ...,
dunder_names_to_keep: Sequence[str] = ...,
+9 -4
View File
@@ -1,9 +1,11 @@
import os
import sys
from _typeshed import FileDescriptor, Incomplete, ReadableBuffer
from _typeshed import FileDescriptor, ReadableBuffer
from collections.abc import Callable
from typing import Literal
from gevent._types import _ChildWatcher, _Loop
def tp_read(fd: FileDescriptor, n: int) -> bytes: ...
def tp_write(fd: FileDescriptor, buf: ReadableBuffer) -> int: ...
@@ -17,11 +19,14 @@ if sys.platform != "win32":
def forkpty_gevent() -> tuple[int, int]: ...
waitpid = os.waitpid
def fork_and_watch(
callback: Incomplete | None = None, loop: Incomplete | None = None, ref: bool = False, fork: Callable[[], int] = ...
callback: Callable[[_ChildWatcher], object] | None = None,
loop: _Loop | None = None,
ref: bool = False,
fork: Callable[[], int] = ...,
) -> int: ...
def forkpty_and_watch(
callback: Incomplete | None = None,
loop: Incomplete | None = None,
callback: Callable[[_ChildWatcher], object] | None = None,
loop: _Loop | None = None,
ref: bool = False,
forkpty: Callable[[], tuple[int, int]] = ...,
) -> tuple[int, int]: ...