mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-21 19:32:13 +08:00
Fix loop.remove_reader() and loop.remove_writer() return types (#7042)
This commit is contained in:
@@ -353,9 +353,9 @@ class BaseEventLoop(AbstractEventLoop, metaclass=ABCMeta):
|
||||
**kwargs: Any,
|
||||
) -> tuple[SubprocessTransport, _ProtocolT]: ...
|
||||
def add_reader(self, fd: FileDescriptorLike, callback: Callable[..., Any], *args: Any) -> None: ...
|
||||
def remove_reader(self, fd: FileDescriptorLike) -> None: ...
|
||||
def remove_reader(self, fd: FileDescriptorLike) -> bool: ...
|
||||
def add_writer(self, fd: FileDescriptorLike, callback: Callable[..., Any], *args: Any) -> None: ...
|
||||
def remove_writer(self, fd: FileDescriptorLike) -> None: ...
|
||||
def remove_writer(self, fd: FileDescriptorLike) -> bool: ...
|
||||
# Completion based I/O methods returning Futures prior to 3.7
|
||||
if sys.version_info >= (3, 7):
|
||||
async def sock_recv(self, sock: socket, nbytes: int) -> bytes: ...
|
||||
|
||||
@@ -417,11 +417,11 @@ class AbstractEventLoop(metaclass=ABCMeta):
|
||||
@abstractmethod
|
||||
def add_reader(self, fd: FileDescriptorLike, callback: Callable[..., Any], *args: Any) -> None: ...
|
||||
@abstractmethod
|
||||
def remove_reader(self, fd: FileDescriptorLike) -> None: ...
|
||||
def remove_reader(self, fd: FileDescriptorLike) -> bool: ...
|
||||
@abstractmethod
|
||||
def add_writer(self, fd: FileDescriptorLike, callback: Callable[..., Any], *args: Any) -> None: ...
|
||||
@abstractmethod
|
||||
def remove_writer(self, fd: FileDescriptorLike) -> None: ...
|
||||
def remove_writer(self, fd: FileDescriptorLike) -> bool: ...
|
||||
# Completion based I/O methods returning Futures prior to 3.7
|
||||
if sys.version_info >= (3, 7):
|
||||
@abstractmethod
|
||||
|
||||
Reference in New Issue
Block a user