From a9dd0fb9671036df4c46476dc97272b25eaab002 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Mon, 2 Aug 2021 16:28:46 -0700 Subject: [PATCH] blocking_connection: Fix consume() return type Fixes #3. Signed-off-by: Anders Kaseorg --- pika-stubs/adapters/blocking_connection.pyi | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pika-stubs/adapters/blocking_connection.pyi b/pika-stubs/adapters/blocking_connection.pyi index 2de0929..73fa7d2 100644 --- a/pika-stubs/adapters/blocking_connection.pyi +++ b/pika-stubs/adapters/blocking_connection.pyi @@ -1,7 +1,7 @@ from __future__ import annotations import types -from typing import Any, Callable, List, Mapping, Optional, Tuple, Type +from typing import Any, Callable, Iterator, List, Mapping, Optional, Tuple, Type from .. import channel, connection, frame, spec @@ -147,7 +147,13 @@ class BlockingChannel: exclusive: bool = ..., arguments: Optional[Mapping[str, Any]] = ..., inactivity_timeout: Optional[float] = ..., - ) -> None: ... + ) -> Iterator[ + Tuple[ + Optional[spec.Basic.Deliver], + Optional[spec.BasicProperties], + Optional[bytes], + ] + ]: ... def get_waiting_message_count(self) -> int: ...