mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2024-11-21 22:56:38 +01:00
Fix Wrong Warning Text in KeyboardButton.__eq__
(#3768)
This commit is contained in:
parent
8e91a6adba
commit
3c87e450fb
2 changed files with 4 additions and 4 deletions
|
@ -163,8 +163,8 @@ class KeyboardButton(TelegramObject):
|
|||
|
||||
def __eq__(self, other: object) -> bool:
|
||||
warn(
|
||||
"In v21, granular media settings will be considered as well when comparing"
|
||||
" ChatPermissions instances.",
|
||||
"In v21, `request_user` and `request_chat` will be considered as well when comparing"
|
||||
" KeyboardButton instances.",
|
||||
PTBDeprecationWarning,
|
||||
stacklevel=2,
|
||||
)
|
||||
|
|
|
@ -139,8 +139,8 @@ class TestKeyboardButtonWithoutRequest(TestKeyboardButtonBase):
|
|||
assert keyboard_button == keyboard_button
|
||||
|
||||
assert str(recwarn[0].message) == (
|
||||
"In v21, granular media settings will be considered as well when comparing"
|
||||
" ChatPermissions instances."
|
||||
"In v21, `request_user` and `request_chat` will be considered as well when comparing"
|
||||
" KeyboardButton instances."
|
||||
)
|
||||
assert recwarn[0].category is PTBDeprecationWarning
|
||||
assert recwarn[0].filename == __file__, "wrong stacklevel"
|
||||
|
|
Loading…
Reference in a new issue