From 109508c7d38c7bcacee1189ae4a48b31e4f5a382 Mon Sep 17 00:00:00 2001 From: James McKinney <26463+jpmckinney@users.noreply.github.com> Date: Sun, 2 Jul 2023 12:25:34 -0400 Subject: [PATCH] Fix type of frame for add_on_cancel_callback --- pika-stubs/channel.pyi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pika-stubs/channel.pyi b/pika-stubs/channel.pyi index 7dd4c46..db7d8fa 100644 --- a/pika-stubs/channel.pyi +++ b/pika-stubs/channel.pyi @@ -23,6 +23,7 @@ _OnBasicGetCallback = Callable[[Channel, spec.Basic.GetOk, spec.BasicProperties, _OnBasicRecoverCallback = Callable[[frame.Method[spec.Basic.RecoverOk]], None] _OnBasicQosCallback = Callable[[frame.Method[spec.Basic.QosOk]], None] _OnBasicCancelCallback = Callable[[frame.Method[spec.Basic.CancelOk]], None] +_OnCancelCallback = Callable[[spec.Basic.Cancel], None] _OnCloseCallback = Callable[[Channel, Exception], None] _OnExchangeBindCallback = Callable[[frame.Method[spec.Exchange.BindOk]], None] _OnExchangeDeclareCallback = Callable[[frame.Method[spec.Exchange.DeclareOk]], None] @@ -54,7 +55,7 @@ class Channel: def __init__(self, connection: connection_.Connection, channel_number: int, on_open_callback: _OnOpenCallback) -> None: ... def __int__(self) -> int: ... def add_callback(self, callback: Callable[..., Any], replies: Sequence[Any], one_shot: bool = ...) -> None: ... - def add_on_cancel_callback(self, callback: _OnBasicCancelCallback) -> None: ... + def add_on_cancel_callback(self, callback: _OnCancelCallback) -> None: ... def add_on_close_callback(self, callback: _OnCloseCallback) -> None: ... def add_on_flow_callback(self, callback: _OnFlowCallback) -> None: ... def add_on_return_callback(self, callback: _OnReturnCallback) -> None: ...