Skip to content

Conversation

blueset
Copy link
Contributor

@blueset blueset commented Dec 25, 2020

Fix type definition of CallbackQuery.edit_message_reply_markup(reply_markup=...)

CallbackQuery.edit_message_reply_markup calls to either

  • Bot.edit_message_reply_markup(...), or
  • Message.edit_reply_markup(...)
    • which eventually calls Bot.edit_message_reply_markup(...)

In Bot.edit_message_reply_markup, the argument reply_markup is of type Optional[InlineKeyboardMarkup] which clears the inline keyboard of the message when set to None. However, the None branch of the type definition is not found in the CallbackQuery.edit_message_reply_markup(...) method.

This PR fixes this issue.

@blueset
Copy link
Contributor Author

blueset commented Dec 25, 2020

For the failing tests in this PR, the testing bots in the CI are hitting floot limit, which was not caused by any changes made in the PR.

@Bibo-Joshi
Copy link
Member

Hi. Thanks for the PR! We already have #2240 which includes this change, though. So I'll go ahead and close, but I want to emphasize that contributions are welcome ;)

@Bibo-Joshi Bibo-Joshi closed this Dec 25, 2020
@blueset
Copy link
Contributor Author

blueset commented Dec 25, 2020

Thanks for the comment! I tried to find if the fix was alraedy done by someone else, but it turns out the search feature of GitHub isn’t looking into the actual diffs. 😄

Looking forward to #2240 to be merged!

@blueset blueset deleted the callbackquery-type-def branch December 25, 2020 23:33
@github-actions github-actions bot locked and limited conversation to collaborators Dec 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants