Skip to content

Commit

Permalink
Fix loop.remove_reader() and loop.remove_writer() return types (#7042)
Browse files Browse the repository at this point in the history
  • Loading branch information
asvetlov authored Jan 26, 2022
1 parent 0151044 commit 98afaa4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions stdlib/asyncio/base_events.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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: ...
Expand Down
4 changes: 2 additions & 2 deletions stdlib/asyncio/events.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 98afaa4

Please sign in to comment.