mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-28 06:36:54 +08:00
Add missing attribute socket to asyncore (#1991)
* Add missing attribute socket to asyncore * Mark asyncore.dispatcher.socket as optional and undocumented
This commit is contained in:
committed by
Jelle Zijlstra
parent
6cf1ec9654
commit
6c09e19847
@@ -2,10 +2,11 @@ from typing import Tuple, Union, Optional, Any, Dict, overload
|
||||
|
||||
import os
|
||||
import select
|
||||
import socket
|
||||
import sys
|
||||
import time
|
||||
import warnings
|
||||
from socket import SocketType
|
||||
from typing import Optional
|
||||
|
||||
from errno import (EALREADY, EINPROGRESS, EWOULDBLOCK, ECONNRESET, EINVAL,
|
||||
ENOTCONN, ESHUTDOWN, EINTR, EISCONN, EBADF, ECONNABORTED,
|
||||
@@ -38,19 +39,20 @@ class dispatcher:
|
||||
connecting = ... # type: bool
|
||||
closing = ... # type: bool
|
||||
ignore_log_types = ... # type: frozenset[str]
|
||||
socket = ... # type: Optional[SocketType] # undocumented
|
||||
|
||||
def __init__(self, sock: Optional[socket.socket] = ..., map: _maptype = ...) -> None: ...
|
||||
def __init__(self, sock: Optional[SocketType] = ..., map: _maptype = ...) -> None: ...
|
||||
def add_channel(self, map: _maptype = ...) -> None: ...
|
||||
def del_channel(self, map: _maptype = ...) -> None: ...
|
||||
def create_socket(self, family: int, type: int) -> None: ...
|
||||
def set_socket(self, sock: socket.socket, map: _maptype = ...) -> None: ...
|
||||
def set_socket(self, sock: SocketType, map: _maptype = ...) -> None: ...
|
||||
def set_reuse_addr(self) -> None: ...
|
||||
def readable(self) -> bool: ...
|
||||
def writable(self) -> bool: ...
|
||||
def listen(self, backlog: int) -> None: ...
|
||||
def bind(self, address: Union[tuple, str]) -> None: ...
|
||||
def connect(self, address: Union[tuple, str]) -> None: ...
|
||||
def accept(self) -> Optional[Tuple[socket.socket, Any]]: ...
|
||||
def accept(self) -> Optional[Tuple[SocketType, Any]]: ...
|
||||
def send(self, data: bytes) -> int: ...
|
||||
def recv(self, buffer_size: int) -> bytes: ...
|
||||
def close(self) -> None: ...
|
||||
@@ -108,7 +110,7 @@ class dispatcher:
|
||||
def shutdown(self, how: int) -> None: ...
|
||||
|
||||
class dispatcher_with_send(dispatcher):
|
||||
def __init__(self, sock: socket.socket = ..., map: _maptype = ...) -> None: ...
|
||||
def __init__(self, sock: SocketType = ..., map: _maptype = ...) -> None: ...
|
||||
def initiate_send(self) -> None: ...
|
||||
def handle_write(self) -> None: ...
|
||||
# incompatible signature:
|
||||
|
||||
Reference in New Issue
Block a user