mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Fix type hints for keyboard builders
This commit is contained in:
parent
e7cee430b2
commit
76f024c3a5
1 changed files with 1 additions and 1 deletions
|
|
@ -238,7 +238,7 @@ class KeyboardBuilder(Generic[ButtonType]):
|
|||
button = self._button_type(**kwargs)
|
||||
return self.add(button)
|
||||
|
||||
def as_markup(self, **kwargs: Any) -> Union[InlineKeyboardMarkup, ReplyKeyboardMarkup]:
|
||||
def as_markup(self, **kwargs: Any) -> "ButtonType":
|
||||
if self._button_type is KeyboardButton:
|
||||
return ReplyKeyboardMarkup(keyboard=self.export(), **kwargs)
|
||||
return InlineKeyboardMarkup(inline_keyboard=self.export())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue