mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-30 16:14:24 +08:00
committed by
Matthias Kramm
parent
6368baf42a
commit
0e26c1f936
@@ -1,3 +1,4 @@
|
||||
import selectors
|
||||
from socket import socket
|
||||
import ssl
|
||||
import sys
|
||||
@@ -124,7 +125,7 @@ class AbstractEventLoop(metaclass=ABCMeta):
|
||||
@abstractmethod
|
||||
@coroutine
|
||||
def create_datagram_endpoint(self, protocol_factory: _ProtocolFactory,
|
||||
local_addr: str = ..., remote_addr: str = ..., *,
|
||||
local_addr: Optional[Tuple[str, int]] = ..., remote_addr: Optional[Tuple[str, int]] = ..., *,
|
||||
family: int = ..., proto: int = ..., flags: int = ...,
|
||||
reuse_address: Optional[bool] = ..., reuse_port: Optional[bool] = ...,
|
||||
allow_broadcast: Optional[bool] = ...,
|
||||
@@ -146,17 +147,17 @@ class AbstractEventLoop(metaclass=ABCMeta):
|
||||
**kwargs: Any) -> Generator[Any, None, _TransProtPair]: ...
|
||||
@abstractmethod
|
||||
@coroutine
|
||||
def subprocess_exec(self, protocol_factory: _ProtocolFactory, *args: List[Any], stdin: Any = ...,
|
||||
def subprocess_exec(self, protocol_factory: _ProtocolFactory, *args: Any, stdin: Any = ...,
|
||||
stdout: Any = ..., stderr: Any = ...,
|
||||
**kwargs: Any) -> Generator[Any, None, _TransProtPair]: ...
|
||||
@abstractmethod
|
||||
def add_reader(self, fd: int, callback: Callable[..., Any], *args: List[Any]) -> None: ...
|
||||
def add_reader(self, fd: selectors._FileObject, callback: Callable[..., Any], *args: Any) -> None: ...
|
||||
@abstractmethod
|
||||
def remove_reader(self, fd: int) -> None: ...
|
||||
def remove_reader(self, fd: selectors._FileObject) -> None: ...
|
||||
@abstractmethod
|
||||
def add_writer(self, fd: int, callback: Callable[..., Any], *args: List[Any]) -> None: ...
|
||||
def add_writer(self, fd: selectors._FileObject, callback: Callable[..., Any], *args: Any) -> None: ...
|
||||
@abstractmethod
|
||||
def remove_writer(self, fd: int) -> None: ...
|
||||
def remove_writer(self, fd: selectors._FileObject) -> None: ...
|
||||
# Completion based I/O methods returning Futures.
|
||||
@abstractmethod
|
||||
@coroutine
|
||||
@@ -172,7 +173,7 @@ class AbstractEventLoop(metaclass=ABCMeta):
|
||||
def sock_accept(self, sock: socket) -> Generator[Any, None, Tuple[socket, Any]]: ...
|
||||
# Signal handling.
|
||||
@abstractmethod
|
||||
def add_signal_handler(self, sig: int, callback: Callable[..., Any], *args: List[Any]) -> None: ...
|
||||
def add_signal_handler(self, sig: int, callback: Callable[..., Any], *args: Any) -> None: ...
|
||||
@abstractmethod
|
||||
def remove_signal_handler(self, sig: int) -> None: ...
|
||||
# Error handlers.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from typing import Dict, Any, TypeVar, Mapping, List
|
||||
from typing import Dict, Any, TypeVar, Mapping, List, Optional, Tuple
|
||||
|
||||
__all__: List[str]
|
||||
|
||||
@@ -26,7 +26,7 @@ class WriteTransport(BaseTransport):
|
||||
class Transport(ReadTransport, WriteTransport): ...
|
||||
|
||||
class DatagramTransport(BaseTransport):
|
||||
def sendto(self, data: Any, addr: str = ...) -> None: ...
|
||||
def sendto(self, data: Any, addr: Optional[Tuple[str, int]] = ...) -> None: ...
|
||||
def abort(self) -> None: ...
|
||||
|
||||
class SubprocessTransport(BaseTransport):
|
||||
|
||||
Reference in New Issue
Block a user