mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-08-12 02:42:29 +08:00
Add missing defaults to third-party stubs (#14617)
This commit is contained in:
@@ -170,6 +170,7 @@ gevent.socket.getnameinfo
|
||||
gevent.socket.socket.closed
|
||||
gevent.socket.wait_readwrite
|
||||
gevent.socket.wait_write
|
||||
gevent.socket.socket.__slots__
|
||||
|
||||
# we have punted on ssl, the gevent version of these functions have an additional
|
||||
# argument for timeouts/blocking and there are some with different default values
|
||||
|
||||
@@ -19,7 +19,7 @@ class _SupportsHandleError(Protocol):
|
||||
_ErrorHandler: TypeAlias = _ErrorHandlerFunc | _SupportsHandleError
|
||||
|
||||
def assign_standard_callbacks(
|
||||
ffi: object, lib: object, callbacks_class: Callable[[object], object], extras: Sequence[tuple[object, object]] = ...
|
||||
ffi: object, lib: object, callbacks_class: Callable[[object], object], extras: Sequence[tuple[object, object]] = ()
|
||||
) -> object: ...
|
||||
|
||||
class AbstractLoop:
|
||||
@@ -28,7 +28,7 @@ class AbstractLoop:
|
||||
starting_timer_may_update_loop_time: bool
|
||||
# internal API, this __init__ will only be called from subclasses
|
||||
def __init__(
|
||||
self, ffi: object, lib: object, watchers: object, flags: int | None = ..., default: bool | None = ...
|
||||
self, ffi: object, lib: object, watchers: object, flags: int | None = None, default: bool | None = None
|
||||
) -> None: ...
|
||||
def destroy(self) -> bool | None: ...
|
||||
@property
|
||||
@@ -78,10 +78,10 @@ class AbstractLoop:
|
||||
def install_sigchld(self) -> None: ...
|
||||
|
||||
def async_(self, ref: bool = True, priority: int | None = None) -> _AsyncWatcher: ...
|
||||
def stat(self, path: str, interval: float = 0.0, ref: bool = True, priority: bool | None = ...) -> _StatWatcher: ...
|
||||
def stat(self, path: str, interval: float = 0.0, ref: bool = True, priority: bool | None = None) -> _StatWatcher: ...
|
||||
def run_callback(self, func: Callable[[Unpack[_Ts]], object], *args: Unpack[_Ts]) -> _Callback: ...
|
||||
def run_callback_threadsafe(self, func: Callable[[Unpack[_Ts]], object], *args: Unpack[_Ts]) -> _Callback: ...
|
||||
def callback(self, priority: float | None = ...) -> _Callback: ...
|
||||
def callback(self, priority: float | None = None) -> _Callback: ...
|
||||
def fileno(self) -> FileDescriptor | None: ...
|
||||
|
||||
__all__ = ["AbstractLoop", "assign_standard_callbacks"]
|
||||
|
||||
@@ -14,7 +14,7 @@ class AbstractWatcherType(type):
|
||||
|
||||
class watcher(metaclass=AbstractWatcherType):
|
||||
loop: _Loop
|
||||
def __init__(self, _loop: _Loop, ref: bool = True, priority: int | None = None, args: tuple[object, ...] = ...) -> None: ...
|
||||
def __init__(self, _loop: _Loop, ref: bool = True, priority: int | None = None, args: tuple[object, ...] = ()) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(self, t: type[BaseException] | None, v: BaseException | None, tb: TracebackType | None) -> None: ...
|
||||
|
||||
@@ -8,14 +8,19 @@ _T = TypeVar("_T")
|
||||
WRAPPER_ASSIGNMENTS: tuple[str, ...]
|
||||
WRAPPER_UPDATES: tuple[str, ...]
|
||||
|
||||
def update_wrapper(wrapper: _T, wrapped: object, assigned: Sequence[str] = ..., updated: Sequence[str] = ...) -> _T: ...
|
||||
def update_wrapper(
|
||||
wrapper: _T,
|
||||
wrapped: object,
|
||||
assigned: Sequence[str] = ("__module__", "__name__", "__qualname__", "__doc__", "__annotations__"),
|
||||
updated: Sequence[str] = ("__dict__",),
|
||||
) -> _T: ...
|
||||
def copy_globals(
|
||||
source: ModuleType,
|
||||
globs: MutableMapping[str, Any],
|
||||
only_names: Iterable[str] | None = None,
|
||||
ignore_missing_names: bool = False,
|
||||
names_to_ignore: Sequence[str] = ...,
|
||||
dunder_names_to_keep: Sequence[str] = ...,
|
||||
names_to_ignore: Sequence[str] = (),
|
||||
dunder_names_to_keep: Sequence[str] = ("__implements__", "__all__", "__imports__"),
|
||||
cleanup_globs: bool = True,
|
||||
) -> list[str]: ...
|
||||
def import_c_accel(globs: MutableMapping[str, Any], cname: str) -> None: ...
|
||||
|
||||
@@ -43,7 +43,7 @@ if sys.platform != "win32":
|
||||
def reinit(self) -> None: ...
|
||||
def ref(self) -> None: ...
|
||||
def unref(self) -> None: ...
|
||||
def break_(self, how: int = ...) -> None: ...
|
||||
def break_(self, how: int = 1) -> None: ...
|
||||
def verify(self) -> None: ...
|
||||
def now(self) -> float: ...
|
||||
def update_now(self) -> None: ...
|
||||
|
||||
@@ -43,7 +43,7 @@ class channel:
|
||||
flags: int = 0,
|
||||
) -> None: ...
|
||||
def gethostbyaddr(self, callback: Callable[[Result[ares_host_result]], object], addr: str) -> Any: ...
|
||||
def gethostbyname(self, callback: Callable[[Result[ares_host_result]], object], name: str, family: int = ...) -> None: ...
|
||||
def gethostbyname(self, callback: Callable[[Result[ares_host_result]], object], name: str, family: int = 2) -> None: ...
|
||||
def getnameinfo(self, callback: Callable[[Result[_NameinfoResult]], object], sockaddr: _SockAddr, flags: int) -> None: ...
|
||||
def set_servers(self, servers: Sequence[str] | str | None = None) -> None: ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user