From da9b7d1ad68d75053ddb86c6dd9eefa862d6ac93 Mon Sep 17 00:00:00 2001 From: Stefan de Konink Date: Tue, 22 Oct 2024 23:20:03 +0200 Subject: [PATCH] Don't use KeyboardBuilder directly As discussed in issue #1595 KeyboardBuilder should not be used directly. Instead InlineKeyboardBuilder or ReplyKeyboardBuilder should be used. This fix makes sure that the documentation rendered does not include a "wrong example". --- aiogram/utils/keyboard.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aiogram/utils/keyboard.py b/aiogram/utils/keyboard.py index 921c28c1..da0a105f 100644 --- a/aiogram/utils/keyboard.py +++ b/aiogram/utils/keyboard.py @@ -152,7 +152,7 @@ class KeyboardBuilder(Generic[ButtonType], ABC): .. code-block:: python - >>> builder = KeyboardBuilder(button_type=InlineKeyboardButton) + >>> builder = InlineKeyboardBuilder(button_type=InlineKeyboardButton) >>> ... # Add buttons to builder >>> markup = InlineKeyboardMarkup(inline_keyboard=builder.export())