aiogram.types.inline_keyboard: using self.__class__ instead of explicit InlineKeyboardMarkup class initializing

This commit is contained in:
floordiv 2021-04-12 15:22:19 +03:00
parent 46de5ecb0f
commit 6a342dd0a8

View file

@ -87,7 +87,7 @@ class InlineKeyboardMarkup(base.TelegramObject):
return self.add(other)
def __add__(self, other):
return InlineKeyboardMarkup(
return self.__class__(
inline_keyboard=self.inline_keyboard + other.keyboard,
row_width=self.row_width,
conf=self.conf,