Repository Analysis

python-telegram-bot/python-telegram-bot

We have made you a wrapper you can't refuse

20.2 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of python-telegram-bot/python-telegram-bot, a Python project with 29,436 GitHub stars. SynthScan v2.0 examined 170,349 lines of code across 860 source files, recording 3151 pattern matches distributed across 17 syntactic categories. The overall adjusted score of 20.2 places this repository in the Moderate AI signal band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

20.2
Adjusted Score
20.2
Raw Score
100%
Time Factor
2026-08-23
Last Push
29.4K
Stars
Python
Language
170.3K
Lines of Code
860
Files
3.2K
Pattern Hits
2026-08-29
Scan Date
0.20
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 0HIGH 175MEDIUM 53LOW 2923

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 3151 distinct pattern matches across 17 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Hyper-Verbose Identifiers1451 hits · 1266 pts
SeverityFileLineSnippetContext
LOWtests/test_messageautodeletetimerchanged.py54 def test_time_period_properties(self, PTB_TIMEDELTA):CODE
LOWtests/test_messageautodeletetimerchanged.py66 def test_time_period_int_deprecated(self, recwarn, PTB_TIMEDELTA):CODE
LOWtests/test_botcommandscope.py55 def test_type_enum_conversion(self, bot_command_scope):CODE
LOWtests/test_botcommandscope.py112def bot_command_scope_all_private_chats():CODE
LOWtests/test_botcommandscope.py152def bot_command_scope_all_chat_administrators():CODE
LOWtests/test_botcommandscope.py192def bot_command_scope_all_group_chats():CODE
LOWtests/test_botcommandscope.py278def bot_command_scope_chat_administrators():CODE
LOWtests/test_botcommandscope.py328def bot_command_scope_chat_member():CODE
LOWtests/test_botcommandscope.py385def bot_command_scope_default():CODE
LOWtests/test_version.py32 def test_bot_api_version_and_info(self):CODE
LOWtests/test_menubutton.py51 def test_type_enum_conversion(self, menu_button):CODE
LOWtests/conftest.py59def no_rerun_after_xfail_or_flood(error, name, test: pytest.Function, plugin):CODE
LOWtests/conftest.py68def pytest_collection_modifyitems(items: list[pytest.Item]):CODE
LOWtests/conftest.py95 def _disallow_requests_in_without_request_tests(request):CODE
LOWtests/conftest.py292def _get_false_update_fixture_decorator_params():CODE
LOWtests/test_suggestedpost.py44def suggested_post_parameters():CODE
LOWtests/test_suggestedpost.py76 def test_de_json_localization(self, offline_bot, raw_bot, tz_bot):CODE
LOWtests/test_suggestedpost.py144 def test_type_enum_conversion(self):CODE
LOWtests/test_suggestedpost.py160 def test_de_json_localization(self, offline_bot, raw_bot, tz_bot):CODE
LOWtests/test_suggestedpost.py488 def test_de_json_localization(self, offline_bot, raw_bot, tz_bot):CODE
LOWtests/test_suggestedpost.py542def suggested_post_approval_failed():CODE
LOWtests/test_messageorigin.py65def message_origin_hidden_user():CODE
LOWtests/test_messageorigin.py139 def test_de_json_required_args(self, offline_bot, message_origin_type):CODE
LOWtests/test_messageorigin.py166 def test_de_json_messageorigin_localization(CODE
LOWtests/test_messageorigin.py182 def test_de_json_invalid_type(self, message_origin_type, offline_bot):CODE
LOWtests/test_user.py189 async def test_instance_method_get_profile_photos(self, monkeypatch, user):CODE
LOWtests/test_user.py204 async def test_instance_method_get_profile_audios(self, monkeypatch, user):CODE
LOWtests/test_user.py219 async def test_instance_method_pin_message(self, monkeypatch, user):CODE
LOWtests/test_user.py230 async def test_instance_method_unpin_message(self, monkeypatch, user):CODE
LOWtests/test_user.py243 async def test_instance_method_unpin_all_messages(self, monkeypatch, user):CODE
LOWtests/test_user.py258 async def test_instance_method_send_message(self, monkeypatch, user):CODE
LOWtests/test_user.py269 async def test_instance_method_send_message_draft(self, monkeypatch, user):CODE
LOWtests/test_user.py288 async def test_instance_method_send_photo(self, monkeypatch, user):CODE
LOWtests/test_user.py299 async def test_instance_method_send_live_photo(self, monkeypatch, user):CODE
LOWtests/test_user.py314 async def test_instance_method_send_media_group(self, monkeypatch, user):CODE
LOWtests/test_user.py327 async def test_instance_method_send_audio(self, monkeypatch, user):CODE
LOWtests/test_user.py338 async def test_instance_method_send_chat_action(self, monkeypatch, user):CODE
LOWtests/test_user.py351 async def test_instance_method_send_contact(self, monkeypatch, user):CODE
LOWtests/test_user.py362 async def test_instance_method_send_dice(self, monkeypatch, user):CODE
LOWtests/test_user.py373 async def test_instance_method_send_document(self, monkeypatch, user):CODE
LOWtests/test_user.py384 async def test_instance_method_send_game(self, monkeypatch, user):CODE
LOWtests/test_user.py395 async def test_instance_method_send_invoice(self, monkeypatch, user):CODE
LOWtests/test_user.py420 async def test_instance_method_send_location(self, monkeypatch, user):CODE
LOWtests/test_user.py431 async def test_instance_method_send_sticker(self, monkeypatch, user):CODE
LOWtests/test_user.py442 async def test_instance_method_send_video(self, monkeypatch, user):CODE
LOWtests/test_user.py453 async def test_instance_method_send_venue(self, monkeypatch, user):CODE
LOWtests/test_user.py464 async def test_instance_method_send_video_note(self, monkeypatch, user):CODE
LOWtests/test_user.py475 async def test_instance_method_send_voice(self, monkeypatch, user):CODE
LOWtests/test_user.py486 async def test_instance_method_send_animation(self, monkeypatch, user):CODE
LOWtests/test_user.py497 async def test_instance_method_send_poll(self, monkeypatch, user):CODE
LOWtests/test_user.py508 async def test_instance_method_send_copy(self, monkeypatch, user):CODE
LOWtests/test_user.py522 async def test_instance_method_copy_message(self, monkeypatch, user):CODE
LOWtests/test_user.py536 async def test_instance_method_get_user_chat_boosts(self, monkeypatch, user):CODE
LOWtests/test_user.py553 async def test_instance_method_get_menu_button(self, monkeypatch, user):CODE
LOWtests/test_user.py571 async def test_instance_method_set_menu_button(self, monkeypatch, user):CODE
LOWtests/test_user.py589 async def test_instance_method_approve_join_request(self, monkeypatch, user):CODE
LOWtests/test_user.py606 async def test_instance_method_decline_join_request(self, monkeypatch, user):CODE
LOWtests/test_user.py684 async def test_instance_method_send_copies(self, monkeypatch, user):CODE
LOWtests/test_user.py698 async def test_instance_method_copy_messages(self, monkeypatch, user):CODE
LOWtests/test_user.py714 async def test_instance_method_forward_from(self, monkeypatch, user):CODE
1391 more matches not shown…
Cross-File Repetition96 hits · 480 pts
SeverityFileLineSnippetContext
HIGHexamples/conversationbot2.py0first, a few callback functions are defined. then, those functions are passed to the application and registered at theirSTRING
HIGHexamples/persistentconversationbot.py0first, a few callback functions are defined. then, those functions are passed to the application and registered at theirSTRING
HIGHexamples/conversationbot.py0first, a few callback functions are defined. then, those functions are passed to the application and registered at theirSTRING
HIGHexamples/nestedconversationbot.py0first, a few callback functions are defined. then, those functions are passed to the application and registered at theirSTRING
HIGHexamples/customwebhookbot/djangobot.py0simple example of a bot that uses a custom webhook setup and handles custom updates. for the custom webhook setup, the lSTRING
HIGHexamples/customwebhookbot/quartbot.py0simple example of a bot that uses a custom webhook setup and handles custom updates. for the custom webhook setup, the lSTRING
HIGHexamples/customwebhookbot/flaskbot.py0simple example of a bot that uses a custom webhook setup and handles custom updates. for the custom webhook setup, the lSTRING
HIGHexamples/customwebhookbot/starlettebot.py0simple example of a bot that uses a custom webhook setup and handles custom updates. for the custom webhook setup, the lSTRING
HIGHexamples/customwebhookbot/djangobot.py0custom callbackcontext class that makes `user_data` available for updates of type `webhookupdate`.STRING
HIGHexamples/customwebhookbot/quartbot.py0custom callbackcontext class that makes `user_data` available for updates of type `webhookupdate`.STRING
HIGHexamples/customwebhookbot/flaskbot.py0custom callbackcontext class that makes `user_data` available for updates of type `webhookupdate`.STRING
HIGHexamples/customwebhookbot/starlettebot.py0custom callbackcontext class that makes `user_data` available for updates of type `webhookupdate`.STRING
HIGHexamples/customwebhookbot/djangobot.py0display a message with instructions on how to use this bot.STRING
HIGHexamples/customwebhookbot/quartbot.py0display a message with instructions on how to use this bot.STRING
HIGHexamples/customwebhookbot/flaskbot.py0display a message with instructions on how to use this bot.STRING
HIGHexamples/customwebhookbot/starlettebot.py0display a message with instructions on how to use this bot.STRING
HIGHexamples/customwebhookbot/djangobot.py0handle incoming telegram updates by putting them into the `update_queue`STRING
HIGHexamples/customwebhookbot/quartbot.py0handle incoming telegram updates by putting them into the `update_queue`STRING
HIGHexamples/customwebhookbot/flaskbot.py0handle incoming telegram updates by putting them into the `update_queue`STRING
HIGHexamples/customwebhookbot/starlettebot.py0handle incoming telegram updates by putting them into the `update_queue`STRING
HIGHexamples/customwebhookbot/djangobot.py0handle incoming webhook updates by also putting them into the `update_queue` if the required parameters were passed corrSTRING
HIGHexamples/customwebhookbot/quartbot.py0handle incoming webhook updates by also putting them into the `update_queue` if the required parameters were passed corrSTRING
HIGHexamples/customwebhookbot/flaskbot.py0handle incoming webhook updates by also putting them into the `update_queue` if the required parameters were passed corrSTRING
HIGHexamples/customwebhookbot/starlettebot.py0handle incoming webhook updates by also putting them into the `update_queue` if the required parameters were passed corrSTRING
HIGHexamples/customwebhookbot/djangobot.py0for the health endpoint, reply with a simple plain text message.STRING
HIGHexamples/customwebhookbot/quartbot.py0for the health endpoint, reply with a simple plain text message.STRING
HIGHexamples/customwebhookbot/flaskbot.py0for the health endpoint, reply with a simple plain text message.STRING
HIGHexamples/customwebhookbot/starlettebot.py0for the health endpoint, reply with a simple plain text message.STRING
HIGHexamples/customwebhookbot/quartbot.py0set up ptb application and a web application for handling the incoming requests.STRING
HIGHexamples/customwebhookbot/flaskbot.py0set up ptb application and a web application for handling the incoming requests.STRING
HIGHexamples/customwebhookbot/starlettebot.py0set up ptb application and a web application for handling the incoming requests.STRING
HIGHsrc/telegram/_ownedgift.py0returns the text from a given :class:`telegram.messageentity`. note: this method is present because telegram calculates STRING
HIGHsrc/telegram/_poll.py0returns the text from a given :class:`telegram.messageentity`. note: this method is present because telegram calculates STRING
HIGHsrc/telegram/_message.py0returns the text from a given :class:`telegram.messageentity`. note: this method is present because telegram calculates STRING
HIGHsrc/telegram/_gifts.py0returns the text from a given :class:`telegram.messageentity`. note: this method is present because telegram calculates STRING
HIGHsrc/telegram/_games/game.py0returns the text from a given :class:`telegram.messageentity`. note: this method is present because telegram calculates STRING
HIGHsrc/telegram/_ownedgift.py0returns a :obj:`dict` that maps :class:`telegram.messageentity` to :obj:`str`. it contains entities from this polls descSTRING
HIGHsrc/telegram/_poll.py0returns a :obj:`dict` that maps :class:`telegram.messageentity` to :obj:`str`. it contains entities from this polls descSTRING
HIGHsrc/telegram/_gifts.py0returns a :obj:`dict` that maps :class:`telegram.messageentity` to :obj:`str`. it contains entities from this polls descSTRING
HIGHsrc/telegram/_checklists.py0returns a :obj:`dict` that maps :class:`telegram.messageentity` to :obj:`str`. it contains entities from this polls descSTRING
HIGHsrc/telegram/_games/game.py0returns a :obj:`dict` that maps :class:`telegram.messageentity` to :obj:`str`. it contains entities from this polls descSTRING
HIGHsrc/telegram/_telegramobject.py0builds a hash value for this object such that the hash of two objects is equal if and only if the objects are equal in tSTRING
HIGHsrc/telegram/ext/_jobqueue.py0builds a hash value for this object such that the hash of two objects is equal if and only if the objects are equal in tSTRING
HIGHsrc/telegram/ext/_defaults.py0builds a hash value for this object such that the hash of two objects is equal if and only if the objects are equal in tSTRING
HIGHsrc/telegram/_bot.py0give a string representation of the handler in the form ``classname[callback=...]``. as this class doesn't implement :meSTRING
HIGHsrc/telegram/ext/_jobqueue.py0give a string representation of the handler in the form ``classname[callback=...]``. as this class doesn't implement :meSTRING
HIGHsrc/telegram/ext/_extbot.py0give a string representation of the handler in the form ``classname[callback=...]``. as this class doesn't implement :meSTRING
HIGHsrc/telegram/ext/_updater.py0give a string representation of the handler in the form ``classname[callback=...]``. as this class doesn't implement :meSTRING
HIGHsrc/telegram/ext/_application.py0give a string representation of the handler in the form ``classname[callback=...]``. as this class doesn't implement :meSTRING
HIGHsrc/telegram/ext/_handlers/basehandler.py0give a string representation of the handler in the form ``classname[callback=...]``. as this class doesn't implement :meSTRING
HIGHsrc/telegram/_chat.py0shortcut for:: await bot.repost_story( from_chat_id=update.effective_user.id, *args, **kwargs ) for the documentation ofSTRING
HIGHsrc/telegram/_story.py0shortcut for:: await bot.repost_story( from_chat_id=update.effective_user.id, *args, **kwargs ) for the documentation ofSTRING
HIGHsrc/telegram/_user.py0shortcut for:: await bot.repost_story( from_chat_id=update.effective_user.id, *args, **kwargs ) for the documentation ofSTRING
HIGHsrc/telegram/_utils/logging.py0this module contains a helper functions related to string manipulation. warning: contents of this module are intended toSTRING
HIGHsrc/telegram/_utils/enum.py0this module contains a helper functions related to string manipulation. warning: contents of this module are intended toSTRING
HIGHsrc/telegram/_utils/strings.py0this module contains a helper functions related to string manipulation. warning: contents of this module are intended toSTRING
HIGHsrc/telegram/_inline/inlinequeryresultcacheddocument.py0represents a link to a video animation (h.264/mpeg-4 avc video without sound) stored on the telegram servers. by defaultSTRING
HIGHsrc/telegram/_inline/inlinequeryresultcachedgif.py0represents a link to a video animation (h.264/mpeg-4 avc video without sound) stored on the telegram servers. by defaultSTRING
HIGHsrc/telegram/_inline/inlinequeryresultcachedvideo.py0represents a link to a video animation (h.264/mpeg-4 avc video without sound) stored on the telegram servers. by defaultSTRING
HIGHsrc/telegram/_inline/inlinequeryresultcachedmpeg4gif.py0represents a link to a video animation (h.264/mpeg-4 avc video without sound) stored on the telegram servers. by defaultSTRING
36 more matches not shown…
Over-Commented Block475 hits · 466 pts
SeverityFileLineSnippetContext
LOWtests/test_messageautodeletetimerchanged.py1#!/usr/bin/env pythonCOMMENT
LOWtests/test_webappinfo.py1#!/usr/bin/env pythonCOMMENT
LOWtests/test_shared.py1#!/usr/bin/env pythonCOMMENT
LOWtests/test_botcommandscope.py1#!/usr/bin/env pythonCOMMENT
LOWtests/test_sentwebappmessage.py1#!/usr/bin/env pythonCOMMENT
LOWtests/test_version.py1#!/usr/bin/env pythonCOMMENT
LOWtests/test_menubutton.py1#!/usr/bin/env pythonCOMMENT
LOWtests/conftest.py1#!/usr/bin/env pythonCOMMENT
LOWtests/test_suggestedpost.py1#!/usr/bin/env pythonCOMMENT
LOWtests/test_messageorigin.py1#!/usr/bin/env pythonCOMMENT
LOWtests/test_warnings.py1#!/usr/bin/env pythonCOMMENT
LOWtests/test_user.py1#!/usr/bin/env pythonCOMMENT
LOWtests/test_webappdata.py1#!/usr/bin/env pythonCOMMENT
LOWtests/test_keyboardbuttonrequest.py1#!/usr/bin/env pythonCOMMENT
LOWtests/test_forum.py1#!/usr/bin/env pythonCOMMENT
LOWtests/test_preparedkeyboardbutton.py1#!/usr/bin/env pythonCOMMENT
LOWtests/test_videochat.py1#!/usr/bin/env pythonCOMMENT
LOWtests/test_keyboardbuttonpolltype.py1#!/usr/bin/env pythonCOMMENT
LOWtests/test_chatfullinfo.py1#!/usr/bin/env pythonCOMMENT
LOWtests/test_userrating.py1#!/usr/bin/env pythonCOMMENT
LOWtests/test_chatmemberupdated.py1#!/usr/bin/env pythonCOMMENT
LOWtests/test_message.py1#!/usr/bin/env pythonCOMMENT
LOWtests/test_chatlocation.py1#!/usr/bin/env pythonCOMMENT
LOWtests/test_checklists.py1#!/usr/bin/env pythonCOMMENT
LOWtests/test_reply.py1#!/usr/bin/env pythonCOMMENT
LOWtests/test_botaccesssettings.py1#!/usr/bin/env pythonCOMMENT
LOWtests/test_dice.py1#!/usr/bin/env pythonCOMMENT
LOWtests/test_business_methods.py1#!/usr/bin/env pythonCOMMENT
LOWtests/test_directmessagepricechanged.py1#!/usr/bin/env pythonCOMMENT
LOWtests/test_paidmedia.py1#!/usr/bin/env pythonCOMMENT
LOWtests/test_gifts.py1#!/usr/bin/env pythonCOMMENT
LOWtests/test_botdescription.py1#!/usr/bin/env pythonCOMMENT
LOWtests/test_inputchecklist.py1#!/usr/bin/env pythonCOMMENT
LOWtests/test_sentguestmessage.py1#!/usr/bin/env pythonCOMMENT
LOWtests/test_webhookinfo.py1#!/usr/bin/env pythonCOMMENT
LOWtests/test_chatpermissions.py1#!/usr/bin/env pythonCOMMENT
LOWtests/test_chatinvitelink.py1#!/usr/bin/env pythonCOMMENT
LOWtests/test_enum_types.py1#!/usr/bin/env pythonCOMMENT
LOWtests/test_messageentity.py1#!/usr/bin/env pythonCOMMENT
LOWtests/test_chatjoinrequest.py1#!/usr/bin/env pythonCOMMENT
LOWtests/test_update.py1#!/usr/bin/env pythonCOMMENT
LOWtests/test_copytextbutton.py1#!/usr/bin/env pythonCOMMENT
LOWtests/test_loginurl.py1#!/usr/bin/env pythonCOMMENT
LOWtests/test_chatmember.py1#!/usr/bin/env pythonCOMMENT
LOWtests/test_userprofilephotos.py1#!/usr/bin/env pythonCOMMENT
LOWtests/test_messageid.py1#!/usr/bin/env pythonCOMMENT
LOWtests/test_maybeinaccessiblemessage.py1#!/usr/bin/env pythonCOMMENT
LOWtests/test_managedbot.py1#!/usr/bin/env pythonCOMMENT
LOWtests/test_story.py1#!/usr/bin/env pythonCOMMENT
LOWtests/test_replykeyboardremove.py1#!/usr/bin/env pythonCOMMENT
LOWtests/test_chat.py1#!/usr/bin/env pythonCOMMENT
LOWtests/test_botcommand.py1#!/usr/bin/env pythonCOMMENT
LOWtests/test_error.py1#!/usr/bin/env pythonCOMMENT
LOWtests/test_business_classes.py1#!/usr/bin/env pythonCOMMENT
LOWtests/test_userprofileaudios.py1#!/usr/bin/env pythonCOMMENT
LOWtests/test_paidmessagepricechanged.py1#!/usr/bin/env pythonCOMMENT
LOWtests/test_proximityalerttriggered.py1#!/usr/bin/env pythonCOMMENT
LOWtests/test_telegramobject.py1#!/usr/bin/env pythonCOMMENT
LOWtests/test_reaction.py1#!/usr/bin/env pythonCOMMENT
LOWtests/test_slots.py1#!/usr/bin/env pythonCOMMENT
415 more matches not shown…
Docstring Block Structure78 hits · 390 pts
SeverityFileLineSnippetContext
HIGHsrc/telegram/_ownedgift.py261Returns the text in :attr:`text` from a given :class:`telegram.MessageEntity` of :attr:`entities`. NoteSTRING
HIGHsrc/telegram/_ownedgift.py286 Returns a :obj:`dict` that maps :class:`telegram.MessageEntity` to :obj:`str`. It contains entities froSTRING
HIGHsrc/telegram/_poll.py667 This object contains information about a poll. Objects of this class are comparable in terms of equality. Two STRING
HIGHsrc/telegram/_poll.py919Returns the text in :attr:`explanation` from a given :class:`telegram.MessageEntity` of :attr:`explanation_entitSTRING
HIGHsrc/telegram/_poll.py946 Returns a :obj:`dict` that maps :class:`telegram.MessageEntity` to :obj:`str`. It contains entities froSTRING
HIGHsrc/telegram/_poll.py1020Returns the text in :attr:`description` from a given :class:`telegram.MessageEntity` of :attr:`description_entitSTRING
HIGHsrc/telegram/_poll.py1049 Returns a :obj:`dict` that maps :class:`telegram.MessageEntity` to :obj:`str`. It contains entities froSTRING
HIGHsrc/telegram/_chatmember.py32Base class for Telegram ChatMember Objects. Currently, the following 6 types of chat members are supported: * :STRING
HIGHsrc/telegram/_telegramobject.py243 Objects of this type are subscriptable with strings, where ``telegram_object["attribute_name"]`` is equSTRING
HIGHsrc/telegram/_bot.py1042Use this method to send text messages. Args: chat_id (:obj:`int` | :obj:`str`): |chat_id_channel| STRING
HIGHsrc/telegram/_bot.py4390 Use this method to edit text and game messages. Note: * |editreplymarkup| * |bSTRING
HIGHsrc/telegram/_bot.py4809 Use this method to specify a url and receive incoming updates via an outgoing webhook. Whenever there iSTRING
HIGHsrc/telegram/_bot.py5228 Use this method to set the score of the specified user in a game message. .. seealso:: :attr:`telegramSTRING
HIGHsrc/telegram/_chat.py184 Note: :tg-const:`telegram.constants.ParseMode.MARKDOWN` is a legacy mode, retained by TSTRING
HIGHsrc/telegram/_chat.py222 .. versionadded:: 20.0 Args: name (:obj:`str`): The name used as a link for the chat. DefaSTRING
HIGHsrc/telegram/_chat.py255 .. versionadded:: 20.0 Args: name (:obj:`str`): The name used as a link for the chat. DefaSTRING
HIGHsrc/telegram/_message.py268This object represents a message. Objects of this class are comparable in terms of equality. Two objects of this clSTRING
HIGHsrc/telegram/_message.py1728 Use this function to compute position and entities of a quote in the message text or caption. Useful foSTRING
HIGHsrc/telegram/_message.py1809 Builds a dictionary with the keys ``chat_id`` and ``reply_parameters``. This dictionary can be used to STRING
HIGHsrc/telegram/_message.py2361Shortcut for:: await bot.send_media_group( update.effective_message.chat_id, STRING
HIGHsrc/telegram/_message.py5237Returns the text from a given :class:`telegram.MessageEntity`. Note: This method is present becauseSTRING
HIGHsrc/telegram/_message.py5261Returns the text from a given :class:`telegram.MessageEntity`. Note: This method is present becauseSTRING
HIGHsrc/telegram/_gifts.py367Returns the text in :attr:`text` from a given :class:`telegram.MessageEntity` of :attr:`entities`. NoteSTRING
HIGHsrc/telegram/_gifts.py392 Returns a :obj:`dict` that maps :class:`telegram.MessageEntity` to :obj:`str`. It contains entities froSTRING
HIGHsrc/telegram/_messageentity.py183Utility functionality for converting the offset and length of entities from Unicode (:obj:`str`) to UTF-16 (``utSTRING
HIGHsrc/telegram/_messageentity.py256Utility functionality for shifting the offset of entities by a given amount. Examples: Shifting by STRING
HIGHsrc/telegram/_messageentity.py322Utility functionality for concatenating two text along with their formatting entities. Tip: This fuSTRING
HIGHsrc/telegram/_webappdata.py26Contains data sent from a `Web App <https://core.telegram.org/bots/webapps>`_ to the bot. Objects of this class areSTRING
HIGHsrc/telegram/_business.py404 This object describes an interval of time during which a business is open. Objects of this class are comparablSTRING
HIGHsrc/telegram/_webappinfo.py26 This object contains information about a `Web App <https://core.telegram.org/bots/webapps>`_. Objects of this STRING
HIGHsrc/telegram/_replykeyboardremove.py26 Upon receiving a message with this object, Telegram clients will remove the current custom keyboard and displaySTRING
HIGHsrc/telegram/_keyboardbuttonpolltype.py28This object represents type of a poll, which is allowed to be created and sent when the corresponding button is presSTRING
HIGHsrc/telegram/helpers.py152 Creates a deep-linked URL for this :paramref:`~create_deep_linked_url.bot_username` with the specified :paramreSTRING
HIGHsrc/telegram/_replykeyboardmarkup.py32This object represents a custom keyboard with reply options. Not supported in channels and for messages sent on behaSTRING
HIGHsrc/telegram/_chatmemberupdated.py32This object represents changes in the status of a chat member. Objects of this class are comparable in terms of equSTRING
HIGHsrc/telegram/_update.py47This object represents an incoming update. Objects of this class are comparable in terms of equality. Two objects oSTRING
HIGHsrc/telegram/_utils/defaultvalue.py38Wrapper for immutable default arguments that allows to check, if the default value was set explicitly. Usage:: STRING
HIGHsrc/telegram/_utils/datetime.py71 Converts a given time object to a float POSIX timestamp. Used to convert different time specifications to a comSTRING
HIGHsrc/telegram/_passport/credentials.py50 Decrypt per telegram docs at https://core.telegram.org/passport. Args: secret (:obj:`str` or :obj:`bytSTRING
HIGHsrc/telegram/_inline/inlinequeryresultarticle.py33This object represents a Telegram InlineQueryResultArticle. Examples: :any:`Inline Bot <examples.inlinebot>STRING
HIGHsrc/telegram/_inline/inlinekeyboardmarkup.py30 This object represents an inline keyboard that appears right next to the message it belongs to. Objects of thiSTRING
HIGHsrc/telegram/_inline/inputtextmessagecontent.py35 Represents the content of a text message to be sent as the result of an inline query. Objects of this class arSTRING
HIGHsrc/telegram/_inline/inlinekeyboardbutton.py34This object represents one button of an inline keyboard. Objects of this class are comparable in terms of equality.STRING
HIGHsrc/telegram/_inline/inlinequeryresult.py31Baseclass for the InlineQueryResult* classes. Objects of this class are comparable in terms of equality. Two objectSTRING
HIGHsrc/telegram/ext/_jobqueue.py857Overrides :py:meth:`object.__getattr__` to get specific attribute of the :class:`telegram.ext.Job` object or of STRING
HIGHsrc/telegram/ext/_applicationbuilder.py899Sets the private key and corresponding password for decryption of telegram passport data for :attr:`telegram.extSTRING
HIGHsrc/telegram/ext/_applicationbuilder.py951Specifies whether :attr:`telegram.ext.Application.bot` should allow arbitrary objects as callback data for :clasSTRING
HIGHsrc/telegram/ext/_applicationbuilder.py1091Sets a :class:`telegram.ext.JobQueue` instance for :attr:`telegram.ext.Application.job_queue`. If not called, a STRING
HIGHsrc/telegram/ext/_applicationbuilder.py1123Sets a :class:`telegram.ext.BasePersistence` instance for :attr:`telegram.ext.Application.persistence`. STRING
HIGHsrc/telegram/ext/_applicationbuilder.py1157Sets a :class:`telegram.ext.ContextTypes` instance for :attr:`telegram.ext.Application.context_types`. STRING
HIGHsrc/telegram/ext/_callbackdatacache.py48 Raised when the received callback data has been tampered with or deleted from cache. Examples: :any:`ASTRING
HIGHsrc/telegram/ext/_callbackdatacache.py111A custom cache for storing the callback data of a :class:`telegram.ext.ExtBot`. Internally, it keeps two mappings wiSTRING
HIGHsrc/telegram/ext/_baseratelimiter.py68 Process a request. Must be implemented by a subclass. This method must call :paramref:`callback` and rSTRING
HIGHsrc/telegram/ext/_callbackcontext.py47 This is a context object passed to the callback called by :class:`telegram.ext.BaseHandler` or by the :class:`tSTRING
HIGHsrc/telegram/ext/_updater.py216Starts polling updates from Telegram. .. versionchanged:: 20.0 Removed the ``clean`` argument in faSTRING
HIGHsrc/telegram/ext/_updater.py435 Starts a small http server to listen for updates via webhook. If :paramref:`cert` and :paramref:`key` aSTRING
HIGHsrc/telegram/ext/_picklepersistence.py123Using python's builtin :mod:`pickle` for making your bot persistent. Attention: The interface provided by tSTRING
HIGHsrc/telegram/ext/filters.py819Filters messages to allow only those which are from a specified chat ID or username. Examples: ``MessageHanSTRING
HIGHsrc/telegram/ext/filters.py1426Filters messages to allow only those which are forwarded from the specified chat ID(s) or username(s) based on :attrSTRING
HIGHsrc/telegram/ext/filters.py1866Filters messages to allow only those which are from a specified sender chat's chat ID or username. Examples: STRING
18 more matches not shown…
Unused Imports573 hits · 359 pts
SeverityFileLineSnippetContext
LOWtests/test_official/helpers.py33CODE
LOWtests/request/test_request.py59CODE
LOWtests/request/test_request.py59CODE
LOWtests/request/test_request.py59CODE
LOWtests/request/test_request.py59CODE
LOWtests/request/test_request.py59CODE
LOWdocs/auxil/sphinx_hooks.py43CODE
LOWdocs/source/conf.py343CODE
LOWsrc/telegram/_callbackquery.py34CODE
LOWsrc/telegram/_callbackquery.py34CODE
LOWsrc/telegram/_callbackquery.py34CODE
LOWsrc/telegram/_callbackquery.py34CODE
LOWsrc/telegram/_callbackquery.py34CODE
LOWsrc/telegram/_callbackquery.py34CODE
LOWsrc/telegram/_callbackquery.py34CODE
LOWsrc/telegram/_callbackquery.py34CODE
LOWsrc/telegram/_callbackquery.py44CODE
LOWsrc/telegram/_callbackquery.py45CODE
LOWsrc/telegram/_bot.py125CODE
LOWsrc/telegram/_bot.py125CODE
LOWsrc/telegram/_bot.py125CODE
LOWsrc/telegram/_bot.py125CODE
LOWsrc/telegram/_bot.py125CODE
LOWsrc/telegram/_bot.py125CODE
LOWsrc/telegram/_bot.py125CODE
LOWsrc/telegram/_bot.py125CODE
LOWsrc/telegram/_bot.py125CODE
LOWsrc/telegram/_bot.py125CODE
LOWsrc/telegram/_bot.py125CODE
LOWsrc/telegram/_bot.py125CODE
LOWsrc/telegram/_bot.py125CODE
LOWsrc/telegram/_bot.py125CODE
LOWsrc/telegram/_bot.py125CODE
LOWsrc/telegram/_bot.py125CODE
LOWsrc/telegram/_bot.py125CODE
LOWsrc/telegram/_bot.py125CODE
LOWsrc/telegram/_bot.py146CODE
LOWsrc/telegram/__init__.py348CODE
LOWsrc/telegram/__init__.py348CODE
LOWsrc/telegram/__init__.py348CODE
LOWsrc/telegram/__init__.py348CODE
LOWsrc/telegram/__init__.py349CODE
LOWsrc/telegram/__init__.py350CODE
LOWsrc/telegram/__init__.py351CODE
LOWsrc/telegram/__init__.py352CODE
LOWsrc/telegram/__init__.py353CODE
LOWsrc/telegram/__init__.py353CODE
LOWsrc/telegram/__init__.py353CODE
LOWsrc/telegram/__init__.py353CODE
LOWsrc/telegram/__init__.py353CODE
LOWsrc/telegram/__init__.py353CODE
LOWsrc/telegram/__init__.py353CODE
LOWsrc/telegram/__init__.py353CODE
LOWsrc/telegram/__init__.py363CODE
LOWsrc/telegram/__init__.py363CODE
LOWsrc/telegram/__init__.py364CODE
LOWsrc/telegram/__init__.py365CODE
LOWsrc/telegram/__init__.py365CODE
LOWsrc/telegram/__init__.py365CODE
LOWsrc/telegram/__init__.py365CODE
513 more matches not shown…
AI Structural Patterns279 hits · 166 pts
SeverityFileLineSnippetContext
LOWsrc/telegram/_ownedgift.py221CODE
LOWsrc/telegram/_poll.py112CODE
LOWsrc/telegram/_poll.py856CODE
LOWsrc/telegram/_chatfullinfo.py492CODE
LOWsrc/telegram/_chatmember.py333CODE
LOWsrc/telegram/_keyboardbutton.py204CODE
LOWsrc/telegram/_callbackquery.py154CODE
LOWsrc/telegram/_callbackquery.py199CODE
LOWsrc/telegram/_callbackquery.py271CODE
LOWsrc/telegram/_callbackquery.py495CODE
LOWsrc/telegram/_callbackquery.py850CODE
LOWsrc/telegram/_bot.py754CODE
LOWsrc/telegram/_bot.py1015CODE
LOWsrc/telegram/_bot.py1215CODE
LOWsrc/telegram/_bot.py1321CODE
LOWsrc/telegram/_bot.py1409CODE
LOWsrc/telegram/_bot.py1475CODE
LOWsrc/telegram/_bot.py1635CODE
LOWsrc/telegram/_bot.py1809CODE
LOWsrc/telegram/_bot.py1972CODE
LOWsrc/telegram/_bot.py2102CODE
LOWsrc/telegram/_bot.py2303CODE
LOWsrc/telegram/_bot.py2462CODE
LOWsrc/telegram/_bot.py2644CODE
LOWsrc/telegram/_bot.py2807CODE
LOWsrc/telegram/_bot.py2990CODE
LOWsrc/telegram/_bot.py3153CODE
LOWsrc/telegram/_bot.py3267CODE
LOWsrc/telegram/_bot.py3319CODE
LOWsrc/telegram/_bot.py3487CODE
LOWsrc/telegram/_bot.py3632CODE
LOWsrc/telegram/_bot.py3872CODE
LOWsrc/telegram/_bot.py3968CODE
LOWsrc/telegram/_bot.py4306CODE
LOWsrc/telegram/_bot.py4371CODE
LOWsrc/telegram/_bot.py4478CODE
LOWsrc/telegram/_bot.py4554CODE
LOWsrc/telegram/_bot.py4621CODE
LOWsrc/telegram/_bot.py4678CODE
LOWsrc/telegram/_bot.py4793CODE
LOWsrc/telegram/_bot.py5212CODE
LOWsrc/telegram/_bot.py5276CODE
LOWsrc/telegram/_bot.py5332CODE
LOWsrc/telegram/_bot.py5819CODE
LOWsrc/telegram/_bot.py6085CODE
LOWsrc/telegram/_bot.py6156CODE
LOWsrc/telegram/_bot.py7370CODE
LOWsrc/telegram/_bot.py7687CODE
LOWsrc/telegram/_bot.py7806CODE
LOWsrc/telegram/_bot.py8217CODE
LOWsrc/telegram/_bot.py8373CODE
LOWsrc/telegram/_bot.py8528CODE
LOWsrc/telegram/_bot.py9548CODE
LOWsrc/telegram/_bot.py9660CODE
LOWsrc/telegram/_bot.py9879CODE
LOWsrc/telegram/_bot.py9967CODE
LOWsrc/telegram/_bot.py10826CODE
LOWsrc/telegram/_bot.py11084CODE
LOWsrc/telegram/_bot.py11494CODE
LOWsrc/telegram/_bot.py11564CODE
219 more matches not shown…
Self-Referential Comments37 hits · 94 pts
SeverityFileLineSnippetContext
MEDIUMtests/request/test_request.py475 # Create a new one instead of using the fixture so that the mocking can workCOMMENT
MEDIUMdocs/auxil/admonition_inserter.py38# Define the namespace for type resolution. This helps dealing with the internal imports thatCOMMENT
MEDIUMexamples/arbitrarycallbackdatabot.py98 # Create the Application and pass it your bot's token.COMMENT
MEDIUMexamples/conversationbot2.py118 # Create the Application and pass it your bot's token.COMMENT
MEDIUMexamples/inlinekeyboard.py58 # Create the Application and pass it your bot's token.COMMENT
MEDIUMexamples/webappbot.py59 # Create the Application and pass it your bot's token.COMMENT
MEDIUMexamples/echobot.py33# Define a few command handlers. These usually take the two arguments update andCOMMENT
MEDIUMexamples/echobot.py56 # Create the Application and pass it your bot's token.COMMENT
MEDIUMexamples/persistentconversationbot.py135 # Create the Application and pass it your bot's token.COMMENT
MEDIUMexamples/inlinekeyboard2.py168 # Create the Application and pass it your bot's token.COMMENT
MEDIUMexamples/paymentbot.py141 # Create the Application and pass it your bot's token.COMMENT
MEDIUMexamples/chatmemberbot.py158 # Create the Application and pass it your bot's token.COMMENT
MEDIUMexamples/inlinebot.py36# Define a few command handlers. These usually take the two arguments update andCOMMENT
MEDIUMexamples/inlinebot.py82 # Create the Application and pass it your bot's token.COMMENT
MEDIUMexamples/passportbot.py113 # Create the Application and pass it your token and private keyCOMMENT
MEDIUMexamples/timerbot.py36# Define a few command handlers. These usually take the two arguments update andCOMMENT
MEDIUMexamples/timerbot.py95 # Create the Application and pass it your bot's token.COMMENT
MEDIUMexamples/errorhandlerbot.py73 # Create the Application and pass it your bot's token.COMMENT
MEDIUMexamples/pollbot.py161 # Create the Application and pass it your bot's token.COMMENT
MEDIUMexamples/nestedconversationbot.py309 # Create the Application and pass it your bot's token.COMMENT
MEDIUMexamples/deeplinking.py111 # Create the Application and pass it your bot's token.COMMENT
MEDIUMexamples/conversationbot.py141 # Create the Application and pass it your bot's token.COMMENT
MEDIUM.github/workflows/release_pypi.yml125 # Create a tag and a GitHub Release. The description is filled by the static template, weCOMMENT
MEDIUM.github/workflows/chango.yml38 # Create the new fragmentCOMMENT
MEDIUM.github/workflows/copilot-setup-steps.yml1# This file is for the copilot agent on Github. This helps to set up the development environmentCOMMENT
MEDIUM.github/workflows/release_test_pypi.yml127 # Create a tag and a GitHub Release *draft*. The description is filled by the staticCOMMENT
MEDIUMsrc/telegram/_telegramobject.py692 """This method is used for obtaining the attributes of the object.STRING
MEDIUMsrc/telegram/_bot.py855 # Initialize request objects if not already doneCOMMENT
MEDIUMsrc/telegram/_bot.py643 """This method is here to make ext.Defaults work. Because we need to be able to tellSTRING
MEDIUMsrc/telegram/_reaction.py173 """This class represents a reaction added to a message along with the number of times it wasSTRING
MEDIUMsrc/telegram/_messagereactionupdated.py33 """This class represents reaction changes on a message with anonymous reactions.STRING
MEDIUMsrc/telegram/_messagereactionupdated.py86 """This class represents a change of a reaction on a message performed by a user.STRING
MEDIUMsrc/telegram/ext/_jobqueue.py238 """This method is used as a callback for the APScheduler jobs.STRING
MEDIUMsrc/telegram/ext/_jobqueue.py754 """This class is a convenience wrapper for the jobs held in a :class:`telegram.ext.JobQueue`.STRING
MEDIUMsrc/telegram/ext/_extbot.py706 """This method is called by Bot.answer_inline_query to build the actual results list.STRING
MEDIUMsrc/telegram/ext/_extbot.py736 """This method is called by Bot.answer_inline_query to replace `DefaultValue(obj)` withSTRING
MEDIUMsrc/telegram/ext/_utils/webhookhandler.py48# This module is not visible to users, so we log as UpdaterCOMMENT
Decorative Section Separators13 hits · 54 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_paidmedia.py382# ===========================================================================================COMMENT
MEDIUMtests/test_paidmedia.py383# ===========================================================================================COMMENT
MEDIUMtests/test_paidmedia.py384# ===========================================================================================COMMENT
MEDIUMtests/test_paidmedia.py385# ===========================================================================================COMMENT
MEDIUMtests/test_paidmedia.py386# ===========================================================================================COMMENT
MEDIUMtests/test_paidmedia.py387# ===========================================================================================COMMENT
MEDIUMtests/test_paidmedia.py388# ===========================================================================================COMMENT
MEDIUMtests/test_paidmedia.py389# ===========================================================================================COMMENT
MEDIUMtests/test_paidmedia.py390# ===========================================================================================COMMENT
MEDIUMtests/test_paidmedia.py391# ===========================================================================================COMMENT
MEDIUMdocs/auxil/sphinx_hooks.py115 # -------------------------------------------------COMMENT
MEDIUMdocs/auxil/sphinx_hooks.py142 # -------------------------------------------------COMMENT
MEDIUMdocs/auxil/sphinx_hooks.py150 # -------------------------------------------COMMENT
Modern Structural Boilerplate50 hits · 50 pts
SeverityFileLineSnippetContext
LOWexamples/arbitrarycallbackdatabot.py35logger = logging.getLogger(__name__)CODE
LOWexamples/conversationbot2.py36logger = logging.getLogger(__name__)CODE
LOWexamples/inlinekeyboard.py22logger = logging.getLogger(__name__)CODE
LOWexamples/webappbot.py25logger = logging.getLogger(__name__)CODE
LOWexamples/echobot.py30logger = logging.getLogger(__name__)CODE
LOWexamples/persistentconversationbot.py37logger = logging.getLogger(__name__)CODE
LOWexamples/inlinekeyboard2.py36logger = logging.getLogger(__name__)CODE
LOWexamples/paymentbot.py27logger = logging.getLogger(__name__)CODE
LOWexamples/chatmemberbot.py36logger = logging.getLogger(__name__)CODE
LOWexamples/inlinebot.py33logger = logging.getLogger(__name__)CODE
LOWexamples/passportbot.py33logger = logging.getLogger(__name__)CODE
LOWexamples/timerbot.py63async def set_timer(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None:CODE
LOWexamples/errorhandlerbot.py23logger = logging.getLogger(__name__)CODE
LOWexamples/rawapibot.py24logger = logging.getLogger(__name__)CODE
LOWexamples/pollbot.py39logger = logging.getLogger(__name__)CODE
LOWexamples/contexttypesbot.py35logger = logging.getLogger(__name__)CODE
LOWexamples/nestedconversationbot.py38logger = logging.getLogger(__name__)CODE
LOWexamples/deeplinking.py41logger = logging.getLogger(__name__)CODE
LOWexamples/conversationbot.py36logger = logging.getLogger(__name__)CODE
LOWexamples/customwebhookbot/djangobot.py48logger = logging.getLogger(__name__)CODE
LOWexamples/customwebhookbot/quartbot.py44logger = logging.getLogger(__name__)CODE
LOWexamples/customwebhookbot/flaskbot.py45logger = logging.getLogger(__name__)CODE
LOWexamples/customwebhookbot/starlettebot.py47logger = logging.getLogger(__name__)CODE
LOWsrc/telegram/warnings.py23__all__ = ["PTBDeprecationWarning", "PTBRuntimeWarning", "PTBUserWarning"]CODE
LOWsrc/telegram/_telegramobject.py831 def set_bot(self, bot: "Bot | None") -> None:CODE
LOWsrc/telegram/constants.py38__all__ = [CODE
LOWsrc/telegram/_inline/inlinekeyboardbutton.py328 def _set_id_attrs(self) -> None:CODE
LOWsrc/telegram/_inline/inlinekeyboardbutton.py343 def update_callback_data(self, callback_data: str | object) -> None:CODE
LOWsrc/telegram/ext/_applicationbuilder.py289 def _updater_check(self, name: str) -> None:CODE
LOWsrc/telegram/ext/_callbackdatacache.py99 def update_access_time(self) -> None:CODE
LOWsrc/telegram/ext/_basepersistence.py172 def set_bot(self, bot: Bot) -> None:CODE
LOWsrc/telegram/ext/_basepersistence.py286 async def update_user_data(self, user_id: int, data: UD) -> None:CODE
LOWsrc/telegram/ext/_basepersistence.py297 async def update_chat_data(self, chat_id: int, data: CD) -> None:CODE
LOWsrc/telegram/ext/_basepersistence.py308 async def update_bot_data(self, data: BD) -> None:CODE
LOWsrc/telegram/ext/_basepersistence.py318 async def update_callback_data(self, data: CDCData) -> None:CODE
LOWsrc/telegram/ext/_application.py1231 async def _update_fetcher(self) -> None:CODE
LOWsrc/telegram/ext/_application.py1662 async def update_persistence(self) -> None:CODE
LOWsrc/telegram/ext/_picklepersistence.py412 async def update_user_data(self, user_id: int, data: UD) -> None:CODE
LOWsrc/telegram/ext/_picklepersistence.py430 async def update_chat_data(self, chat_id: int, data: CD) -> None:CODE
LOWsrc/telegram/ext/_picklepersistence.py448 async def update_bot_data(self, data: BD) -> None:CODE
LOWsrc/telegram/ext/_picklepersistence.py464 async def update_callback_data(self, data: CDCData) -> None:CODE
LOWsrc/telegram/ext/_dictpersistence.py315 async def update_user_data(self, user_id: int, data: dict[Any, Any]) -> None:CODE
LOWsrc/telegram/ext/_dictpersistence.py329 async def update_chat_data(self, chat_id: int, data: dict[Any, Any]) -> None:CODE
LOWsrc/telegram/ext/_dictpersistence.py343 async def update_bot_data(self, data: dict[Any, Any]) -> None:CODE
LOWsrc/telegram/ext/_dictpersistence.py354 async def update_callback_data(self, data: CDCData) -> None:CODE
LOWsrc/telegram/ext/filters.py698 def _set_chat_ids(self, chat_id: SCT[int] | None) -> None:CODE
LOWsrc/telegram/ext/filters.py706 def _set_usernames(self, username: SCT[str] | None) -> None:CODE
LOWsrc/telegram/ext/_utils/trackingdict.py97 def update_no_track(self, mapping: Mapping[_KT, _VT]) -> None:CODE
LOWsrc/telegram/ext/_utils/webhookhandler.py152 def set_default_headers(self) -> None:CODE
LOWsrc/telegram/_files/file.py366 def set_credentials(self, credentials: "FileCredentials") -> None:CODE
Excessive Try-Catch Wrapping33 hits · 34 pts
SeverityFileLineSnippetContext
LOWtests/auxil/bot_method_checks.py265 except Exception as exc:CODE
LOWtests/auxil/bot_method_checks.py686 except Exception as exc:CODE
LOWtests/ext/test_conversationhandler.py721 except Exception as exc:CODE
LOWtests/ext/test_application.py2830 except Exception as e:CODE
LOWdocs/auxil/link_code.py45 except Exception as exc:CODE
LOWdocs/auxil/tg_const_role.py91 except Exception as exc:CODE
LOWsrc/telegram/_bot.py416 except Exception:CODE
LOWsrc/telegram/_bot.py4784 except Exception as exc:CODE
LOWsrc/telegram/_utils/files.py94 except Exception:CODE
LOWsrc/telegram/ext/_jobqueue.py1001 except Exception as exc:CODE
LOWsrc/telegram/ext/_jobqueue.py1011 except Exception as exc:CODE
LOWsrc/telegram/ext/_updater.py141 except Exception:CODE
LOWsrc/telegram/ext/_updater.py309 except Exception:CODE
LOWsrc/telegram/ext/_updater.py348 except Exception as exc:CODE
LOWsrc/telegram/ext/_updater.py585 except Exception:CODE
MEDIUMsrc/telegram/ext/_updater.py338def polling_action_cb() -> None:CODE
LOWsrc/telegram/ext/_application.py371 except Exception:CODE
LOWsrc/telegram/ext/_application.py635 except Exception:CODE
LOWsrc/telegram/ext/_application.py1183 except Exception as exception:CODE
LOWsrc/telegram/ext/_application.py1287 except Exception as exc:CODE
LOWsrc/telegram/ext/_application.py1324 except Exception as exc:CODE
LOWsrc/telegram/ext/_application.py1903 except Exception as exc:CODE
LOWsrc/telegram/ext/_application.py1931 except Exception as exc:CODE
LOWsrc/telegram/ext/_picklepersistence.py265 except Exception as exc:CODE
LOWsrc/telegram/ext/_picklepersistence.py277 except Exception as exc:CODE
MEDIUMsrc/telegram/ext/_picklepersistence.py245def _load_singlefile(self) -> None:CODE
LOWsrc/telegram/ext/_baseupdateprocessor.py90 except Exception:CODE
LOWsrc/telegram/ext/_utils/webhookhandler.py168 except Exception as exc:CODE
LOWsrc/telegram/ext/_utils/stack.py60 except Exception as exc:CODE
LOWsrc/telegram/ext/_handlers/conversationhandler.py667 except Exception as exc:CODE
LOWsrc/telegram/ext/_handlers/conversationhandler.py702 except Exception as exc:CODE
LOWsrc/telegram/request/_baserequest.py118 except Exception:CODE
LOWsrc/telegram/request/_baserequest.py316 except Exception as exc:CODE
Deep Nesting39 hits · 33 pts
SeverityFileLineSnippetContext
LOWtests/test_bot.py566CODE
LOWtests/test_official/scraper.py85CODE
LOWtests/test_official/arg_type_checker.py96CODE
LOWtests/auxil/bot_method_checks.py59CODE
LOWtests/auxil/bot_method_checks.py273CODE
LOWtests/auxil/bot_method_checks.py431CODE
LOWtests/_files/test_sticker.py778CODE
LOWdocs/auxil/admonition_inserter.py272CODE
LOWdocs/auxil/admonition_inserter.py483CODE
LOWdocs/auxil/admonition_inserter.py511CODE
LOWdocs/auxil/sphinx_hooks.py66CODE
LOWdocs/auxil/sphinx_hooks.py86CODE
LOWexamples/chatmemberbot.py65CODE
LOWsrc/telegram/_telegramobject.py295CODE
LOWsrc/telegram/_telegramobject.py414CODE
LOWsrc/telegram/_telegramobject.py517CODE
LOWsrc/telegram/_telegramobject.py741CODE
LOWsrc/telegram/_bot.py642CODE
LOWsrc/telegram/_message.py1890CODE
LOWsrc/telegram/_message.py5337CODE
LOWsrc/telegram/_message.py5537CODE
LOWsrc/telegram/helpers.py45CODE
LOWsrc/telegram/_update.py514CODE
LOWsrc/telegram/_update.py670CODE
LOWsrc/telegram/_update.py737CODE
LOWsrc/telegram/_passport/encryptedpassportelement.py214CODE
LOWsrc/telegram/ext/_callbackdatacache.py328CODE
LOWsrc/telegram/ext/_extbot.py444CODE
LOWsrc/telegram/ext/_extbot.py735CODE
LOWsrc/telegram/ext/_application.py1021CODE
LOWsrc/telegram/ext/_application.py1248CODE
LOWsrc/telegram/ext/_application.py1685CODE
LOWsrc/telegram/ext/_application.py1854CODE
LOWsrc/telegram/ext/filters.py461CODE
LOWsrc/telegram/ext/_handlers/conversationhandler.py286CODE
LOWsrc/telegram/ext/_handlers/conversationhandler.py706CODE
LOWsrc/telegram/ext/_handlers/conversationhandler.py797CODE
LOWsrc/telegram/ext/_handlers/conversationhandler.py897CODE
LOWsrc/telegram/request/_baserequest.py259CODE
Redundant / Tautological Comments13 hits · 21 pts
SeverityFileLineSnippetContext
LOWtests/conftest.py74 if ( # Check if the class name ends with 'WithRequest' and if it has no flaky markerCODE
LOWtests/test_bot.py4379 # Check if we pinned 3 messagesCOMMENT
LOWtests/test_bot.py4377 assert len(messages) == 3 # Check if we sent 3 messagesCODE
LOWtests/test_bot.py4381 assert all(i.done() for i in pinned_messages_tasks) # Check if all tasks are doneCODE
LOWtests/test_bot.py4682 # Check if its been deleted-COMMENT
LOWtests/test_official/test_official.py78 # Check if parameter is present in our methodCOMMENT
LOWtests/test_official/test_official.py89 # Check if type annotation is presentCOMMENT
LOWtests/test_official/test_official.py93 # Check if type annotation is correctCOMMENT
LOWtests/test_official/test_official.py169 # Check if type annotation is presentCOMMENT
LOWtests/test_official/test_official.py174 # Check if type annotation is correctCOMMENT
LOWexamples/paymentbot.py106 # Verify if the payload matches, ensure it's from your botCOMMENT
LOWexamples/paymentbot.py125 # Verify if the payload matches, ensure it's from your botCOMMENT
LOWsrc/telegram/ext/_applicationbuilder.py1070 # Check if concurrent updates is bool and convert to integerCOMMENT
Fake / Example Data6 hits · 6 pts
SeverityFileLineSnippetContext
LOWtests/auxil/dummy_objects.py53 id=123456, is_bot=False, first_name="Dummy", last_name="User", username="dummy_user"CODE
LOWtests/auxil/dummy_objects.py106 "Gifts": Gifts(gifts=[Gift(id="dummy_id", sticker=_DUMMY_STICKER, star_count=1)]),CODE
LOWtests/auxil/dummy_objects.py131 id="dummy_id",CODE
LOWtests/auxil/dummy_objects.py143 "PreparedInlineMessage": PreparedInlineMessage(id="dummy_id", expiration_date=_DUMMY_DATE),CODE
LOWtests/auxil/dummy_objects.py148 transactions=[StarTransaction(id="dummy_id", amount=1, date=_DUMMY_DATE)]CODE
LOWtests/auxil/dummy_objects.py164 boost_id="dummy_id",CODE
Slop Phrases4 hits · 5 pts
SeverityFileLineSnippetContext
LOWpyproject.toml61# When adding new extras, make sure to update `ext` and `all` accordinglyCOMMENT
LOWexamples/inlinebot.py6Don't forget to enable inline mode with @BotFatherSTRING
LOWsrc/telegram/_passport/credentials.py177 # We make sure to base64 decode the secret first.COMMENT
LOWsrc/telegram/ext/_defaults.py147 # TODO: When dropping support, make sure to update _utils.datetime accordinglyCOMMENT
Cross-Language Confusion1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHtests/request/test_requestparameter.py67 ({True: None}, '{"true": null}'),CODE
AI Slop Vocabulary2 hits · 2 pts
SeverityFileLineSnippetContext
LOWexamples/chatmemberbot.py174 # To reset this, simply pass `allowed_updates=[]`COMMENT
MEDIUMsrc/telegram/ext/__init__.py19"""Extensions over the Telegram Bot API to facilitate bot making"""STRING
Verbosity Indicators1 hit · 2 pts
SeverityFileLineSnippetContext
LOWsrc/telegram/ext/filters.py463 # We need to check if the filters are data filters and if so return the merged data.COMMENT