8000 Fix Wrong Warning Text in `KeyboardButton.__eq__` (#3768) · Devors/python-telegram-bot@3c87e45 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3c87e45

Browse files
authored
Fix Wrong Warning Text in KeyboardButton.__eq__ (python-telegram-bot#3768)
1 parent 8e91a6a commit 3c87e45

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

telegram/_keyboardbutton.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,8 @@ def __init__(
163163

164164
def __eq__(self, other: object) -> bool:
165165
warn(
166-
"In v21, granular media settings will be considered as well when comparing"
167-
" ChatPermissions instances.",
166+
"In v21, `request_user` and `request_chat` will be considered as well when comparing"
167+
" KeyboardButton instances.",
168168
PTBDeprecationWarning,
169169
stacklevel=2,
170170
)

tests/test_keyboardbutton.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ def test_equality_warning(self, recwarn, keyboard_button):
139139
assert keyboard_button == keyboard_button
140140

141141
assert str(recwarn[0].message) == (
142-
"In v21, granular media settings will be considered as well when comparing"
143-
" ChatPermissions instances."
142+
"In v21, `request_user` and `request_chat` will be considered as well when comparing"
143+
" KeyboardButton instances."
144144
)
145145
assert recwarn[0].category is PTBDeprecationWarning
146146
assert recwarn[0].filename == __file__, "wrong stacklevel"

0 commit comments

Comments
 (0)
0