mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-25 02:57:14 +08:00
Third-party stubs: enforce CamelCase for type alias names (#8256)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
This commit is contained in:
@@ -7,7 +7,7 @@ from typing_extensions import TypeAlias
|
||||
|
||||
from . import compat as compat, utilities as utilities
|
||||
|
||||
_socket: TypeAlias = socket
|
||||
_Socket: TypeAlias = socket
|
||||
|
||||
socket_map: Mapping[int, socket]
|
||||
map: Mapping[int, socket]
|
||||
@@ -35,20 +35,20 @@ class dispatcher:
|
||||
ignore_log_types: frozenset[Any]
|
||||
logger: Logger = ...
|
||||
compact_traceback: Callable[[], tuple[tuple[str, str, str], BaseException, BaseException, str]] = ...
|
||||
socket: _socket | None = ...
|
||||
def __init__(self, sock: _socket | None = ..., map: Mapping[int, _socket] | None = ...) -> None: ...
|
||||
def add_channel(self, map: Mapping[int, _socket] | None = ...) -> None: ...
|
||||
def del_channel(self, map: Mapping[int, _socket] | None = ...) -> None: ...
|
||||
socket: _Socket | None = ...
|
||||
def __init__(self, sock: _Socket | None = ..., map: Mapping[int, _Socket] | None = ...) -> None: ...
|
||||
def add_channel(self, map: Mapping[int, _Socket] | None = ...) -> None: ...
|
||||
def del_channel(self, map: Mapping[int, _Socket] | None = ...) -> None: ...
|
||||
family_and_type: tuple[int, int] = ...
|
||||
def create_socket(self, family: int = ..., type: int = ...) -> None: ...
|
||||
def set_socket(self, sock: _socket, map: Mapping[int, _socket] | None = ...) -> None: ...
|
||||
def set_socket(self, sock: _Socket, map: Mapping[int, _Socket] | None = ...) -> None: ...
|
||||
def set_reuse_addr(self) -> None: ...
|
||||
def readable(self) -> bool: ...
|
||||
def writable(self) -> bool: ...
|
||||
def listen(self, num: int) -> None: ...
|
||||
def bind(self, addr: tuple[str, int]) -> None: ...
|
||||
def connect(self, address: tuple[str, int]) -> None: ...
|
||||
def accept(self) -> tuple[_socket, tuple[str, int]] | None: ...
|
||||
def accept(self) -> tuple[_Socket, tuple[str, int]] | None: ...
|
||||
def send(self, data: bytes, do_close: bool = ...) -> int: ...
|
||||
def recv(self, buffer_size: int) -> bytes: ...
|
||||
def close(self) -> None: ...
|
||||
@@ -64,7 +64,7 @@ class dispatcher:
|
||||
def handle_write(self) -> None: ...
|
||||
def handle_connect(self) -> None: ...
|
||||
def handle_accept(self) -> None: ...
|
||||
def handle_accepted(self, sock: _socket, addr: Any) -> None: ...
|
||||
def handle_accepted(self, sock: _Socket, addr: Any) -> None: ...
|
||||
def handle_close(self) -> None: ...
|
||||
|
||||
class dispatcher_with_send(dispatcher):
|
||||
@@ -91,6 +91,6 @@ class file_wrapper:
|
||||
|
||||
class file_dispatcher(dispatcher):
|
||||
connected: bool = ...
|
||||
def __init__(self, fd: BytesIO, map: Mapping[int, _socket] | None = ...) -> None: ...
|
||||
socket: _socket = ...
|
||||
def __init__(self, fd: BytesIO, map: Mapping[int, _Socket] | None = ...) -> None: ...
|
||||
socket: _Socket = ...
|
||||
def set_file(self, fd: BytesIO) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user