Repository navigation
fix callback_query_id type according to telegram bot api docs - #2636
Merged
Merged
Conversation
Collaborator
|
Looks true, thank you. |
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
Both interfaces consistently correct the type mismatch without runtime changes or unresolved findings.
No open issues 🎉
What changed in this PR
Fixes #2632 by aligning callback query identifier types with the Telegram Bot API.
Changes:
- Changes
callback_query_idfrominttostrin both bot interfaces. - Updates matching docstrings without changing runtime behavior.
| File | Description |
|---|---|
telebot/async_telebot.py |
Corrects the asynchronous method’s annotation and docstring. |
telebot/__init__.py |
Corrects the synchronous method’s annotation and docstring. |
Review effort: Balanced
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2632
Description
callback_query_idinanswer_callback_queryfrominttostrto strictly match the official Telegram Bot API specification:https://core.telegram.org/bots/api#answercallbackquery
https://core.telegram.org/bots/api#callbackquery
TeleBot) and asynchronous (AsyncTeleBot) implementations.Describe your tests
Tested the changes on my own Telegram bot that handles inline buttons and callback queries. Verified that passing
call.iddirectly tobot.answer_callback_query()works correctly without any static type checker warnings or runtime issues.Python version: 3.14
OS: Linux, Windows 10
Checklist: