telegrinder 0.4.1__tar.gz → 0.5.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of telegrinder might be problematic. Click here for more details.
- telegrinder-0.5.0/.gitattributes +1 -0
- telegrinder-0.5.0/.github/ISSUE_TEMPLATE/bug.md +23 -0
- telegrinder-0.5.0/.github/ISSUE_TEMPLATE/config.yml +5 -0
- telegrinder-0.5.0/.github/ISSUE_TEMPLATE/feat_request.md +16 -0
- telegrinder-0.5.0/.github/actions/install-dependencies/action.yml +21 -0
- telegrinder-0.5.0/.github/dependabot.yaml +11 -0
- telegrinder-0.5.0/.github/pull_request_template.md +18 -0
- telegrinder-0.5.0/.github/workflows/ci.yml +85 -0
- telegrinder-0.5.0/.github/workflows/pull_request.yml +40 -0
- telegrinder-0.5.0/.github/workflows/push.yml +28 -0
- telegrinder-0.5.0/.github/workflows/release.yml +53 -0
- telegrinder-0.5.0/.github/workflows/typegen.yml +49 -0
- telegrinder-0.5.0/.gitignore +148 -0
- telegrinder-0.5.0/.pre-commit-config.yaml +73 -0
- telegrinder-0.5.0/.readthedocs.yaml +13 -0
- {telegrinder-0.4.1 → telegrinder-0.5.0}/LICENSE +2 -2
- telegrinder-0.5.0/PKG-INFO +162 -0
- telegrinder-0.5.0/contributing.md +5 -0
- telegrinder-0.5.0/docs/api.md +58 -0
- telegrinder-0.5.0/docs/community_links.md +11 -0
- telegrinder-0.5.0/docs/index.md +9 -0
- telegrinder-0.5.0/docs/logo.jpg +0 -0
- telegrinder-0.5.0/docs/tools/checkbox.md +93 -0
- telegrinder-0.5.0/docs/tools/formatting.md +90 -0
- telegrinder-0.5.0/docs/tools/global_context.md +129 -0
- telegrinder-0.5.0/docs/tools/index.md +8 -0
- telegrinder-0.5.0/docs/tools/loop_wrapper.md +202 -0
- telegrinder-0.5.0/docs/tutorial/en/0_tutorial.md +22 -0
- telegrinder-0.4.1/telegrinder/py.typed → telegrinder-0.5.0/docs/tutorial/en/10_media.md +0 -0
- telegrinder-0.5.0/docs/tutorial/en/11_handling_errors.md +0 -0
- telegrinder-0.5.0/docs/tutorial/en/12_out-of-box_scenarios.md +0 -0
- telegrinder-0.5.0/docs/tutorial/en/1_setting_up.md +69 -0
- telegrinder-0.5.0/docs/tutorial/en/2_rules.md +115 -0
- telegrinder-0.5.0/docs/tutorial/en/3_functional_bits.md +70 -0
- telegrinder-0.5.0/docs/tutorial/en/4_api.md +78 -0
- telegrinder-0.5.0/docs/tutorial/en/5_nodes.md +165 -0
- telegrinder-0.5.0/docs/tutorial/en/6_dispatch.md +70 -0
- telegrinder-0.5.0/docs/tutorial/en/7_keyboard.md +0 -0
- telegrinder-0.5.0/docs/tutorial/en/8_text.md +0 -0
- telegrinder-0.5.0/docs/tutorial/en/9_states.md +0 -0
- telegrinder-0.5.0/docs/tutorial/ru/0_tutorial.md +22 -0
- telegrinder-0.5.0/docs/tutorial/ru/10_media.md +0 -0
- telegrinder-0.5.0/docs/tutorial/ru/11_handling_errors.md +0 -0
- telegrinder-0.5.0/docs/tutorial/ru/12_out-of-box_scenarios.md +0 -0
- telegrinder-0.5.0/docs/tutorial/ru/1_setting_up.md +68 -0
- telegrinder-0.5.0/docs/tutorial/ru/2_rules.md +116 -0
- telegrinder-0.5.0/docs/tutorial/ru/3_functional_bits.md +70 -0
- telegrinder-0.5.0/docs/tutorial/ru/4_api.md +81 -0
- telegrinder-0.5.0/docs/tutorial/ru/5_nodes.md +166 -0
- telegrinder-0.5.0/docs/tutorial/ru/6_dispatch.md +70 -0
- telegrinder-0.5.0/docs/tutorial/ru/7_keyboard.md +0 -0
- telegrinder-0.5.0/docs/tutorial/ru/8_text.md +0 -0
- telegrinder-0.5.0/docs/tutorial/ru/9_states.md +0 -0
- telegrinder-0.5.0/examples/action.py +41 -0
- telegrinder-0.5.0/examples/assets/cat.jpg +0 -0
- telegrinder-0.5.0/examples/assets/i18n/en/LC_MESSAGES/messages.po +35 -0
- telegrinder-0.5.0/examples/assets/i18n/pl/LC_MESSAGES/messages.po +35 -0
- telegrinder-0.5.0/examples/assets/i18n/ru/LC_MESSAGES/messages.po +36 -0
- telegrinder-0.5.0/examples/assets/kaktovik.txt +1 -0
- telegrinder-0.5.0/examples/assets/kb_set_config.yaml +24 -0
- telegrinder-0.5.0/examples/assets/kitten.jpg +0 -0
- telegrinder-0.5.0/examples/assets/satie.jpeg +0 -0
- telegrinder-0.5.0/examples/assistant.py +53 -0
- telegrinder-0.5.0/examples/blueprint_bot/__main__.py +7 -0
- telegrinder-0.5.0/examples/blueprint_bot/client.py +5 -0
- telegrinder-0.5.0/examples/blueprint_bot/handlers/admin.py +19 -0
- telegrinder-0.5.0/examples/blueprint_bot/handlers/start.py +26 -0
- telegrinder-0.5.0/examples/blueprint_bot/handlers/with_enum.py +61 -0
- telegrinder-0.5.0/examples/callback_data_map.py +23 -0
- telegrinder-0.5.0/examples/callback_query.py +79 -0
- telegrinder-0.5.0/examples/chaotic.py +129 -0
- telegrinder-0.5.0/examples/chat_join_request.py +27 -0
- telegrinder-0.5.0/examples/checkbox.py +28 -0
- telegrinder-0.5.0/examples/choice.py +25 -0
- telegrinder-0.5.0/examples/command.py +65 -0
- telegrinder-0.5.0/examples/custom_api.py +49 -0
- telegrinder-0.5.0/examples/custom_rule.py +49 -0
- telegrinder-0.5.0/examples/download_photo.py +28 -0
- telegrinder-0.5.0/examples/error_catching.py +28 -0
- telegrinder-0.5.0/examples/event_node.py +22 -0
- telegrinder-0.5.0/examples/formatting.py +27 -0
- telegrinder-0.5.0/examples/forward_message.py +37 -0
- telegrinder-0.5.0/examples/global_context.py +72 -0
- telegrinder-0.5.0/examples/i18n.py +29 -0
- telegrinder-0.5.0/examples/inline_bot.py +34 -0
- telegrinder-0.5.0/examples/invoice.py +13 -0
- telegrinder-0.5.0/examples/kaktovik.py +36 -0
- telegrinder-0.5.0/examples/keyboard.py +101 -0
- telegrinder-0.5.0/examples/long_states.py +46 -0
- telegrinder-0.5.0/examples/loop_wrapper.py +38 -0
- telegrinder-0.5.0/examples/message_entities.py +43 -0
- telegrinder-0.5.0/examples/middleware.py +34 -0
- telegrinder-0.5.0/examples/nodes.py +24 -0
- telegrinder-0.5.0/examples/pingpong.py +15 -0
- telegrinder-0.5.0/examples/ravioli.py +71 -0
- telegrinder-0.5.0/examples/reply_handler.py +18 -0
- telegrinder-0.5.0/examples/result_error_log.py +55 -0
- telegrinder-0.5.0/examples/return_manager.py +38 -0
- telegrinder-0.5.0/examples/rule_enum.py +25 -0
- telegrinder-0.5.0/examples/start_command.py +25 -0
- telegrinder-0.5.0/examples/upload.py +24 -0
- telegrinder-0.5.0/examples/user_by_username.py +159 -0
- telegrinder-0.5.0/examples/wait_many.py +37 -0
- telegrinder-0.5.0/examples/webhook_bot/app.py +61 -0
- telegrinder-0.5.0/examples/webhook_bot/bot.py +127 -0
- telegrinder-0.5.0/examples/with_nodes.py +108 -0
- telegrinder-0.5.0/examples/yes_or_no.py +52 -0
- telegrinder-0.5.0/mkdocs.yml +89 -0
- telegrinder-0.5.0/pyproject.toml +167 -0
- telegrinder-0.5.0/readme.md +97 -0
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/__init__.py +38 -56
- telegrinder-0.5.0/telegrinder/__meta__.py +1 -0
- telegrinder-0.5.0/telegrinder/api/__init__.py +15 -0
- telegrinder-0.5.0/telegrinder/api/api.py +175 -0
- telegrinder-0.5.0/telegrinder/api/error.py +54 -0
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/api/response.py +4 -1
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/api/token.py +2 -2
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/bot/__init__.py +9 -25
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/bot/bot.py +31 -25
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/bot/cute_types/__init__.py +0 -0
- telegrinder-0.5.0/telegrinder/bot/cute_types/base.py +226 -0
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/bot/cute_types/callback_query.py +447 -400
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/bot/cute_types/chat_join_request.py +59 -62
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/bot/cute_types/chat_member_updated.py +154 -157
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/bot/cute_types/inline_query.py +41 -44
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/bot/cute_types/message.py +2621 -2590
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/bot/cute_types/pre_checkout_query.py +38 -42
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/bot/cute_types/update.py +1 -8
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/bot/cute_types/utils.py +1 -1
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/bot/dispatch/__init__.py +10 -15
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/bot/dispatch/abc.py +12 -11
- telegrinder-0.5.0/telegrinder/bot/dispatch/action.py +104 -0
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/bot/dispatch/context.py +32 -26
- telegrinder-0.5.0/telegrinder/bot/dispatch/dispatch.py +181 -0
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/bot/dispatch/handler/__init__.py +2 -0
- telegrinder-0.5.0/telegrinder/bot/dispatch/handler/abc.py +25 -0
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/bot/dispatch/handler/audio_reply.py +2 -3
- telegrinder-0.5.0/telegrinder/bot/dispatch/handler/base.py +34 -0
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/bot/dispatch/handler/document_reply.py +2 -3
- telegrinder-0.5.0/telegrinder/bot/dispatch/handler/func.py +97 -0
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/bot/dispatch/handler/media_group_reply.py +2 -3
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/bot/dispatch/handler/message_reply.py +2 -3
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/bot/dispatch/handler/photo_reply.py +2 -3
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/bot/dispatch/handler/sticker_reply.py +2 -3
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/bot/dispatch/handler/video_reply.py +2 -3
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/bot/dispatch/middleware/__init__.py +0 -0
- telegrinder-0.5.0/telegrinder/bot/dispatch/middleware/abc.py +121 -0
- telegrinder-0.5.0/telegrinder/bot/dispatch/middleware/global_middleware.py +55 -0
- telegrinder-0.5.0/telegrinder/bot/dispatch/process.py +130 -0
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/bot/dispatch/return_manager/__init__.py +0 -0
- telegrinder-0.5.0/telegrinder/bot/dispatch/return_manager/abc.py +145 -0
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/bot/dispatch/return_manager/callback_query.py +4 -5
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/bot/dispatch/return_manager/inline_query.py +3 -4
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/bot/dispatch/return_manager/message.py +8 -10
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/bot/dispatch/return_manager/pre_checkout_query.py +4 -5
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/bot/dispatch/view/__init__.py +4 -4
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/bot/dispatch/view/abc.py +6 -16
- telegrinder-0.5.0/telegrinder/bot/dispatch/view/base.py +107 -0
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/bot/dispatch/view/box.py +19 -18
- telegrinder-0.5.0/telegrinder/bot/dispatch/view/callback_query.py +12 -0
- telegrinder-0.5.0/telegrinder/bot/dispatch/view/chat_join_request.py +10 -0
- telegrinder-0.5.0/telegrinder/bot/dispatch/view/chat_member.py +17 -0
- telegrinder-0.5.0/telegrinder/bot/dispatch/view/error.py +9 -0
- telegrinder-0.5.0/telegrinder/bot/dispatch/view/inline_query.py +12 -0
- telegrinder-0.5.0/telegrinder/bot/dispatch/view/message.py +23 -0
- telegrinder-0.5.0/telegrinder/bot/dispatch/view/pre_checkout_query.py +12 -0
- telegrinder-0.5.0/telegrinder/bot/dispatch/view/raw.py +10 -0
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/bot/dispatch/waiter_machine/__init__.py +2 -5
- telegrinder-0.5.0/telegrinder/bot/dispatch/waiter_machine/actions.py +16 -0
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/bot/dispatch/waiter_machine/hasher/__init__.py +1 -3
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/bot/dispatch/waiter_machine/hasher/callback.py +1 -1
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/bot/dispatch/waiter_machine/hasher/hasher.py +11 -7
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/bot/dispatch/waiter_machine/hasher/message.py +0 -0
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/bot/dispatch/waiter_machine/machine.py +43 -60
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/bot/dispatch/waiter_machine/middleware.py +19 -23
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/bot/dispatch/waiter_machine/short_state.py +6 -5
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/bot/polling/__init__.py +0 -0
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/bot/polling/abc.py +0 -0
- telegrinder-0.5.0/telegrinder/bot/polling/polling.py +260 -0
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/bot/rules/__init__.py +3 -16
- telegrinder-0.5.0/telegrinder/bot/rules/abc.py +140 -0
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/bot/rules/callback_data.py +29 -49
- telegrinder-0.5.0/telegrinder/bot/rules/chat_join.py +30 -0
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/bot/rules/command.py +8 -4
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/bot/rules/enum_text.py +3 -4
- telegrinder-0.5.0/telegrinder/bot/rules/func.py +21 -0
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/bot/rules/fuzzy.py +3 -4
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/bot/rules/inline.py +8 -20
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/bot/rules/integer.py +2 -3
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/bot/rules/is_from.py +12 -11
- telegrinder-0.5.0/telegrinder/bot/rules/logic.py +24 -0
- telegrinder-0.5.0/telegrinder/bot/rules/markup.py +50 -0
- telegrinder-0.5.0/telegrinder/bot/rules/mention.py +15 -0
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/bot/rules/message_entities.py +8 -4
- telegrinder-0.5.0/telegrinder/bot/rules/node.py +44 -0
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/bot/rules/payload.py +5 -4
- telegrinder-0.5.0/telegrinder/bot/rules/payment_invoice.py +14 -0
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/bot/rules/regex.py +2 -4
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/bot/rules/rule_enum.py +8 -7
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/bot/rules/start.py +5 -6
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/bot/rules/state.py +1 -1
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/bot/rules/text.py +4 -15
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/bot/rules/update.py +3 -4
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/bot/scenario/__init__.py +0 -0
- telegrinder-0.5.0/telegrinder/bot/scenario/abc.py +18 -0
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/bot/scenario/checkbox.py +1 -1
- telegrinder-0.5.0/telegrinder/bot/scenario/choice.py +39 -0
- telegrinder-0.5.0/telegrinder/client/__init__.py +10 -0
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/client/abc.py +11 -6
- telegrinder-0.5.0/telegrinder/client/aiohttp.py +248 -0
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/client/form_data.py +1 -1
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/model.py +61 -89
- telegrinder-0.5.0/telegrinder/modules.py +462 -0
- telegrinder-0.5.0/telegrinder/msgspec_utils/__init__.py +40 -0
- telegrinder-0.5.0/telegrinder/msgspec_utils/abc.py +18 -0
- telegrinder-0.5.0/telegrinder/msgspec_utils/custom_types/__init__.py +6 -0
- telegrinder-0.5.0/telegrinder/msgspec_utils/custom_types/datetime.py +24 -0
- telegrinder-0.5.0/telegrinder/msgspec_utils/custom_types/enum_meta.py +43 -0
- telegrinder-0.5.0/telegrinder/msgspec_utils/custom_types/literal.py +25 -0
- telegrinder-0.5.0/telegrinder/msgspec_utils/custom_types/option.py +17 -0
- telegrinder-0.5.0/telegrinder/msgspec_utils/decoder.py +389 -0
- telegrinder-0.5.0/telegrinder/msgspec_utils/encoder.py +206 -0
- telegrinder-0.4.1/telegrinder/msgspec_json.py → telegrinder-0.5.0/telegrinder/msgspec_utils/json.py +6 -5
- telegrinder-0.5.0/telegrinder/msgspec_utils/tools.py +75 -0
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/node/__init__.py +24 -7
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/node/attachment.py +1 -0
- telegrinder-0.5.0/telegrinder/node/base.py +376 -0
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/node/callback_query.py +5 -5
- telegrinder-0.5.0/telegrinder/node/collection.py +39 -0
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/node/command.py +1 -2
- telegrinder-0.5.0/telegrinder/node/composer.py +212 -0
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/node/container.py +11 -8
- telegrinder-0.5.0/telegrinder/node/context.py +48 -0
- telegrinder-0.5.0/telegrinder/node/either.py +69 -0
- telegrinder-0.5.0/telegrinder/node/error.py +41 -0
- telegrinder-0.5.0/telegrinder/node/event.py +80 -0
- telegrinder-0.5.0/telegrinder/node/exceptions.py +7 -0
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/node/file.py +0 -0
- telegrinder-0.5.0/telegrinder/node/i18n.py +108 -0
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/node/me.py +3 -2
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/node/payload.py +1 -1
- telegrinder-0.5.0/telegrinder/node/polymorphic.py +102 -0
- telegrinder-0.5.0/telegrinder/node/reply_message.py +12 -0
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/node/rule.py +6 -13
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/node/scope.py +14 -5
- telegrinder-0.5.0/telegrinder/node/session.py +53 -0
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/node/source.py +41 -9
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/node/text.py +1 -2
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/node/tools/__init__.py +0 -0
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/node/tools/generator.py +3 -5
- telegrinder-0.5.0/telegrinder/node/utility.py +16 -0
- telegrinder-0.5.0/telegrinder/py.typed +0 -0
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/rules.py +0 -0
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/tools/__init__.py +48 -88
- telegrinder-0.5.0/telegrinder/tools/aio.py +103 -0
- telegrinder-0.5.0/telegrinder/tools/callback_data_serialization/__init__.py +5 -0
- {telegrinder-0.4.1/telegrinder/tools/callback_data_serilization → telegrinder-0.5.0/telegrinder/tools/callback_data_serialization}/abc.py +0 -0
- {telegrinder-0.4.1/telegrinder/tools/callback_data_serilization → telegrinder-0.5.0/telegrinder/tools/callback_data_serialization}/json_ser.py +2 -3
- {telegrinder-0.4.1/telegrinder/tools/callback_data_serilization → telegrinder-0.5.0/telegrinder/tools/callback_data_serialization}/msgpack_ser.py +45 -27
- telegrinder-0.5.0/telegrinder/tools/final.py +21 -0
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/tools/formatting/__init__.py +2 -18
- telegrinder-0.5.0/telegrinder/tools/formatting/deep_links/__init__.py +39 -0
- telegrinder-0.4.1/telegrinder/tools/formatting/deep_links.py → telegrinder-0.5.0/telegrinder/tools/formatting/deep_links/links.py +12 -85
- telegrinder-0.5.0/telegrinder/tools/formatting/deep_links/parsing.py +90 -0
- telegrinder-0.5.0/telegrinder/tools/formatting/deep_links/validators.py +8 -0
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/tools/formatting/html_formatter.py +18 -45
- telegrinder-0.5.0/telegrinder/tools/fullname.py +83 -0
- telegrinder-0.5.0/telegrinder/tools/global_context/__init__.py +13 -0
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/tools/global_context/abc.py +17 -14
- telegrinder-0.5.0/telegrinder/tools/global_context/builtin_context.py +39 -0
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/tools/global_context/global_context.py +138 -39
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/tools/input_file_directory.py +0 -0
- telegrinder-0.5.0/telegrinder/tools/keyboard/__init__.py +39 -0
- telegrinder-0.5.0/telegrinder/tools/keyboard/abc.py +159 -0
- telegrinder-0.5.0/telegrinder/tools/keyboard/base.py +77 -0
- telegrinder-0.5.0/telegrinder/tools/keyboard/buttons/__init__.py +14 -0
- telegrinder-0.5.0/telegrinder/tools/keyboard/buttons/base.py +18 -0
- {telegrinder-0.4.1/telegrinder/tools → telegrinder-0.5.0/telegrinder/tools/keyboard/buttons}/buttons.py +71 -23
- telegrinder-0.5.0/telegrinder/tools/keyboard/buttons/static_buttons.py +56 -0
- telegrinder-0.5.0/telegrinder/tools/keyboard/buttons/tools.py +18 -0
- telegrinder-0.5.0/telegrinder/tools/keyboard/data.py +20 -0
- telegrinder-0.5.0/telegrinder/tools/keyboard/keyboard.py +131 -0
- telegrinder-0.5.0/telegrinder/tools/keyboard/static_keyboard.py +83 -0
- telegrinder-0.5.0/telegrinder/tools/lifespan.py +141 -0
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/tools/limited_dict.py +4 -1
- telegrinder-0.5.0/telegrinder/tools/loop_wrapper.py +332 -0
- telegrinder-0.5.0/telegrinder/tools/magic/__init__.py +32 -0
- telegrinder-0.5.0/telegrinder/tools/magic/annotations.py +165 -0
- telegrinder-0.5.0/telegrinder/tools/magic/dictionary.py +20 -0
- telegrinder-0.5.0/telegrinder/tools/magic/function.py +246 -0
- telegrinder-0.5.0/telegrinder/tools/magic/shortcut.py +111 -0
- telegrinder-0.5.0/telegrinder/tools/parse_mode.py +12 -0
- telegrinder-0.5.0/telegrinder/tools/singleton/__init__.py +4 -0
- telegrinder-0.5.0/telegrinder/tools/singleton/abc.py +14 -0
- telegrinder-0.5.0/telegrinder/tools/singleton/singleton.py +18 -0
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/tools/state_storage/__init__.py +0 -0
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/tools/state_storage/abc.py +6 -1
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/tools/state_storage/memory.py +1 -1
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/tools/strings.py +0 -0
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/types/__init__.py +307 -268
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/types/enums.py +64 -37
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/types/input_file.py +3 -3
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/types/methods.py +5699 -5055
- telegrinder-0.5.0/telegrinder/types/methods_utils.py +62 -0
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/types/objects.py +7846 -7058
- {telegrinder-0.4.1 → telegrinder-0.5.0}/telegrinder/verification_utils.py +3 -1
- telegrinder-0.5.0/tests/__init__.py +0 -0
- telegrinder-0.5.0/tests/conftest.py +5 -0
- telegrinder-0.5.0/tests/fixtures/__init__.py +0 -0
- telegrinder-0.5.0/tests/fixtures/api_instance.py +10 -0
- telegrinder-0.5.0/tests/fixtures/callback_query_update.py +51 -0
- telegrinder-0.5.0/tests/fixtures/message_update.py +37 -0
- telegrinder-0.5.0/tests/test_api.py +95 -0
- telegrinder-0.5.0/tests/test_bot.py +0 -0
- telegrinder-0.5.0/tests/test_http.py +70 -0
- telegrinder-0.5.0/tests/test_nodes.py +190 -0
- telegrinder-0.5.0/tests/test_rules.py +78 -0
- telegrinder-0.5.0/tests/test_utils.py +81 -0
- telegrinder-0.5.0/tests/test_views.py +144 -0
- telegrinder-0.5.0/tests/tools/__init__.py +0 -0
- telegrinder-0.5.0/tests/tools/test_global_context.py +151 -0
- telegrinder-0.5.0/tests/tools/test_html_formatter.py +0 -0
- telegrinder-0.5.0/tests/tools/test_keyboard.py +0 -0
- telegrinder-0.5.0/tests/tools/test_loop_wrapper.py +0 -0
- telegrinder-0.5.0/tests/tools/test_waiter_machine.py +0 -0
- telegrinder-0.5.0/typegen/__init__.py +36 -0
- telegrinder-0.5.0/typegen/__main__.py +4 -0
- telegrinder-0.5.0/typegen/config.py +35 -0
- telegrinder-0.5.0/typegen/config.toml +954 -0
- telegrinder-0.5.0/typegen/generator.py +716 -0
- telegrinder-0.5.0/typegen/merge_shortcuts.py +295 -0
- telegrinder-0.5.0/typegen/models/__init__.py +31 -0
- telegrinder-0.5.0/typegen/models/config.py +96 -0
- telegrinder-0.5.0/typegen/models/schema.py +103 -0
- telegrinder-0.5.0/typegen/nicifications.py +146 -0
- telegrinder-0.5.0/uv.lock +1158 -0
- telegrinder-0.4.1/PKG-INFO +0 -143
- telegrinder-0.4.1/pyproject.toml +0 -162
- telegrinder-0.4.1/readme.md +0 -79
- telegrinder-0.4.1/telegrinder/api/__init__.py +0 -13
- telegrinder-0.4.1/telegrinder/api/api.py +0 -101
- telegrinder-0.4.1/telegrinder/api/error.py +0 -20
- telegrinder-0.4.1/telegrinder/bot/cute_types/base.py +0 -184
- telegrinder-0.4.1/telegrinder/bot/dispatch/dispatch.py +0 -254
- telegrinder-0.4.1/telegrinder/bot/dispatch/handler/abc.py +0 -23
- telegrinder-0.4.1/telegrinder/bot/dispatch/handler/base.py +0 -57
- telegrinder-0.4.1/telegrinder/bot/dispatch/handler/func.py +0 -129
- telegrinder-0.4.1/telegrinder/bot/dispatch/middleware/abc.py +0 -97
- telegrinder-0.4.1/telegrinder/bot/dispatch/middleware/global_middleware.py +0 -70
- telegrinder-0.4.1/telegrinder/bot/dispatch/process.py +0 -151
- telegrinder-0.4.1/telegrinder/bot/dispatch/return_manager/abc.py +0 -108
- telegrinder-0.4.1/telegrinder/bot/dispatch/view/base.py +0 -231
- telegrinder-0.4.1/telegrinder/bot/dispatch/view/callback_query.py +0 -16
- telegrinder-0.4.1/telegrinder/bot/dispatch/view/chat_join_request.py +0 -11
- telegrinder-0.4.1/telegrinder/bot/dispatch/view/chat_member.py +0 -37
- telegrinder-0.4.1/telegrinder/bot/dispatch/view/inline_query.py +0 -16
- telegrinder-0.4.1/telegrinder/bot/dispatch/view/message.py +0 -43
- telegrinder-0.4.1/telegrinder/bot/dispatch/view/pre_checkout_query.py +0 -16
- telegrinder-0.4.1/telegrinder/bot/dispatch/view/raw.py +0 -116
- telegrinder-0.4.1/telegrinder/bot/dispatch/waiter_machine/actions.py +0 -14
- telegrinder-0.4.1/telegrinder/bot/dispatch/waiter_machine/hasher/state.py +0 -20
- telegrinder-0.4.1/telegrinder/bot/polling/polling.py +0 -139
- telegrinder-0.4.1/telegrinder/bot/rules/abc.py +0 -220
- telegrinder-0.4.1/telegrinder/bot/rules/chat_join.py +0 -48
- telegrinder-0.4.1/telegrinder/bot/rules/func.py +0 -28
- telegrinder-0.4.1/telegrinder/bot/rules/id.py +0 -24
- telegrinder-0.4.1/telegrinder/bot/rules/logic.py +0 -18
- telegrinder-0.4.1/telegrinder/bot/rules/markup.py +0 -42
- telegrinder-0.4.1/telegrinder/bot/rules/mention.py +0 -14
- telegrinder-0.4.1/telegrinder/bot/rules/message.py +0 -15
- telegrinder-0.4.1/telegrinder/bot/rules/node.py +0 -33
- telegrinder-0.4.1/telegrinder/bot/rules/payment_invoice.py +0 -29
- telegrinder-0.4.1/telegrinder/bot/scenario/abc.py +0 -17
- telegrinder-0.4.1/telegrinder/bot/scenario/choice.py +0 -48
- telegrinder-0.4.1/telegrinder/client/__init__.py +0 -12
- telegrinder-0.4.1/telegrinder/client/aiohttp.py +0 -134
- telegrinder-0.4.1/telegrinder/client/sonic.py +0 -212
- telegrinder-0.4.1/telegrinder/modules.py +0 -239
- telegrinder-0.4.1/telegrinder/msgspec_utils.py +0 -478
- telegrinder-0.4.1/telegrinder/node/base.py +0 -294
- telegrinder-0.4.1/telegrinder/node/composer.py +0 -163
- telegrinder-0.4.1/telegrinder/node/either.py +0 -82
- telegrinder-0.4.1/telegrinder/node/event.py +0 -54
- telegrinder-0.4.1/telegrinder/node/polymorphic.py +0 -67
- telegrinder-0.4.1/telegrinder/tools/adapter/__init__.py +0 -19
- telegrinder-0.4.1/telegrinder/tools/adapter/abc.py +0 -49
- telegrinder-0.4.1/telegrinder/tools/adapter/dataclass.py +0 -56
- telegrinder-0.4.1/telegrinder/tools/adapter/errors.py +0 -5
- telegrinder-0.4.1/telegrinder/tools/adapter/event.py +0 -63
- telegrinder-0.4.1/telegrinder/tools/adapter/node.py +0 -46
- telegrinder-0.4.1/telegrinder/tools/adapter/raw_event.py +0 -27
- telegrinder-0.4.1/telegrinder/tools/adapter/raw_update.py +0 -30
- telegrinder-0.4.1/telegrinder/tools/callback_data_serilization/__init__.py +0 -5
- telegrinder-0.4.1/telegrinder/tools/error_handler/__init__.py +0 -10
- telegrinder-0.4.1/telegrinder/tools/error_handler/abc.py +0 -30
- telegrinder-0.4.1/telegrinder/tools/error_handler/error.py +0 -9
- telegrinder-0.4.1/telegrinder/tools/error_handler/error_handler.py +0 -179
- telegrinder-0.4.1/telegrinder/tools/formatting/spec_html_formats.py +0 -75
- telegrinder-0.4.1/telegrinder/tools/functional.py +0 -8
- telegrinder-0.4.1/telegrinder/tools/global_context/__init__.py +0 -12
- telegrinder-0.4.1/telegrinder/tools/global_context/telegrinder_ctx.py +0 -27
- telegrinder-0.4.1/telegrinder/tools/i18n/__init__.py +0 -12
- telegrinder-0.4.1/telegrinder/tools/i18n/abc.py +0 -32
- telegrinder-0.4.1/telegrinder/tools/i18n/middleware/__init__.py +0 -3
- telegrinder-0.4.1/telegrinder/tools/i18n/middleware/abc.py +0 -22
- telegrinder-0.4.1/telegrinder/tools/i18n/simple.py +0 -43
- telegrinder-0.4.1/telegrinder/tools/keyboard.py +0 -132
- telegrinder-0.4.1/telegrinder/tools/lifespan.py +0 -105
- telegrinder-0.4.1/telegrinder/tools/loop_wrapper/__init__.py +0 -4
- telegrinder-0.4.1/telegrinder/tools/loop_wrapper/abc.py +0 -20
- telegrinder-0.4.1/telegrinder/tools/loop_wrapper/loop_wrapper.py +0 -169
- telegrinder-0.4.1/telegrinder/tools/magic.py +0 -344
- telegrinder-0.4.1/telegrinder/tools/parse_mode.py +0 -6
|
@@ -0,0 +1 @@
|
|
|
1
|
+
* text=auto eol=lf
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "\U0001F41B Bug report \U0001F41B"
|
|
3
|
+
about: "Reporting a bug."
|
|
4
|
+
title: "bug: "
|
|
5
|
+
labels: ["bug"]
|
|
6
|
+
assignees: []
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
**bug description:**
|
|
10
|
+
...
|
|
11
|
+
|
|
12
|
+
**code:**
|
|
13
|
+
<!-- Provide a minimal example to reproduce -->
|
|
14
|
+
```python
|
|
15
|
+
import telegrinder
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
**logs:**
|
|
19
|
+
<!-- Provide logs/errors if applicable-->
|
|
20
|
+
```console
|
|
21
|
+
Traceback (most recent call last):
|
|
22
|
+
File "main.py", line 1, in <module>
|
|
23
|
+
```
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "\U0001F680 Feature request \U0001F680"
|
|
3
|
+
about: "Creating a feature request."
|
|
4
|
+
title: "feature: "
|
|
5
|
+
labels: ["feature request"]
|
|
6
|
+
assignees: []
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
**feature description:**
|
|
10
|
+
...
|
|
11
|
+
|
|
12
|
+
**code:**
|
|
13
|
+
<!-- A small code sample that will demonstrate your feature. -->
|
|
14
|
+
```python
|
|
15
|
+
from telegrinder import MyFeature
|
|
16
|
+
```
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
name: Install uv and dependencies
|
|
2
|
+
|
|
3
|
+
inputs:
|
|
4
|
+
python-version:
|
|
5
|
+
description: "Python version."
|
|
6
|
+
required: false
|
|
7
|
+
default: "3.12"
|
|
8
|
+
|
|
9
|
+
runs:
|
|
10
|
+
using: composite
|
|
11
|
+
steps:
|
|
12
|
+
- uses: hynek/setup-cached-uv@v2
|
|
13
|
+
with:
|
|
14
|
+
cache-suffix: -${{ inputs.python-version }}-cache
|
|
15
|
+
cache-dependency-path: "**/uv.lock"
|
|
16
|
+
|
|
17
|
+
- name: "Install dependencies"
|
|
18
|
+
run: |
|
|
19
|
+
uv venv --python ${{ inputs.python-version }}
|
|
20
|
+
uv sync --all-groups --dev
|
|
21
|
+
shell: bash
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
### ✏️ Description ✏️
|
|
2
|
+
<!--
|
|
3
|
+
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context.
|
|
4
|
+
-->
|
|
5
|
+
_No response_
|
|
6
|
+
|
|
7
|
+
`🐛 Fixes # (issue)`
|
|
8
|
+
|
|
9
|
+
### 📍 Type of change 📍
|
|
10
|
+
- [ ] 🐛 Bug fix (non-breaking change which fixes an issue) 🐛
|
|
11
|
+
- [ ] 🚀 New feature (non-breaking change which adds functionality) 🚀
|
|
12
|
+
- [ ] ⚡ Breaking change (fix or feature that would cause existing functionality not to work as expected) ⚡
|
|
13
|
+
- [ ] 📝 This change requires a documentation update 📝
|
|
14
|
+
|
|
15
|
+
### ⚪️ Checklist ⚪️
|
|
16
|
+
* [ ] 📝 Your code has documentation 📝
|
|
17
|
+
* [ ] 🔧 Your code has tests 🔧
|
|
18
|
+
* [ ] 🪄 Your code has example usage in `/examples` 🪄
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
'on':
|
|
4
|
+
workflow_call:
|
|
5
|
+
inputs:
|
|
6
|
+
os:
|
|
7
|
+
description: "Operating system"
|
|
8
|
+
required: true
|
|
9
|
+
type: string
|
|
10
|
+
python-version:
|
|
11
|
+
description: "Python version"
|
|
12
|
+
required: true
|
|
13
|
+
type: string
|
|
14
|
+
|
|
15
|
+
defaults:
|
|
16
|
+
run:
|
|
17
|
+
shell: bash
|
|
18
|
+
|
|
19
|
+
jobs:
|
|
20
|
+
lock-file:
|
|
21
|
+
name: "Lock uv"
|
|
22
|
+
runs-on: ${{ inputs.os }}
|
|
23
|
+
steps:
|
|
24
|
+
- uses: asottile/workflows/.github/actions/fast-checkout@v1.8.1
|
|
25
|
+
|
|
26
|
+
- uses: ./.github/actions/install-dependencies
|
|
27
|
+
with:
|
|
28
|
+
python-version: ${{ inputs.python-version }}
|
|
29
|
+
|
|
30
|
+
- run: uv lock --locked
|
|
31
|
+
|
|
32
|
+
linting:
|
|
33
|
+
name: "Linting"
|
|
34
|
+
runs-on: ${{ inputs.os }}
|
|
35
|
+
needs: lock-file
|
|
36
|
+
steps:
|
|
37
|
+
- uses: asottile/workflows/.github/actions/fast-checkout@v1.8.1
|
|
38
|
+
|
|
39
|
+
- uses: ./.github/actions/install-dependencies
|
|
40
|
+
with:
|
|
41
|
+
python-version: ${{ inputs.python-version }}
|
|
42
|
+
|
|
43
|
+
- name: Load ruff cache
|
|
44
|
+
id: cached-ruff
|
|
45
|
+
uses: actions/cache@v4
|
|
46
|
+
with:
|
|
47
|
+
key: ruff-${{ inputs.python-version }}-${{ runner.os }}-${{ hashFiles('pyproject.toml') }}
|
|
48
|
+
path: .ruff_cache
|
|
49
|
+
|
|
50
|
+
- name: "Run ruff"
|
|
51
|
+
run: uvx ruff check .
|
|
52
|
+
|
|
53
|
+
type-checking:
|
|
54
|
+
name: "Type-checking"
|
|
55
|
+
runs-on: ${{ inputs.os }}
|
|
56
|
+
needs: lock-file
|
|
57
|
+
steps:
|
|
58
|
+
- uses: asottile/workflows/.github/actions/fast-checkout@v1.8.1
|
|
59
|
+
|
|
60
|
+
- uses: ./.github/actions/install-dependencies
|
|
61
|
+
with:
|
|
62
|
+
python-version: ${{ inputs.python-version }}
|
|
63
|
+
|
|
64
|
+
- run: uv run basedpyright --level ERROR
|
|
65
|
+
|
|
66
|
+
tests:
|
|
67
|
+
name: "Testing"
|
|
68
|
+
runs-on: ${{ inputs.os }}
|
|
69
|
+
needs: lock-file
|
|
70
|
+
steps:
|
|
71
|
+
- uses: asottile/workflows/.github/actions/fast-checkout@v1.8.1
|
|
72
|
+
|
|
73
|
+
- uses: ./.github/actions/install-dependencies
|
|
74
|
+
with:
|
|
75
|
+
python-version: ${{ inputs.python-version }}
|
|
76
|
+
|
|
77
|
+
- name: Load pytest cache
|
|
78
|
+
id: cached-pytest
|
|
79
|
+
uses: actions/cache@v4
|
|
80
|
+
with:
|
|
81
|
+
key: pytest-${{ inputs.python-version }}-${{ runner.os }}
|
|
82
|
+
path: .pytest_cache
|
|
83
|
+
|
|
84
|
+
- name: "Run pytest"
|
|
85
|
+
run: uv run pytest --cov
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
name: PR
|
|
2
|
+
|
|
3
|
+
'on':
|
|
4
|
+
pull_request:
|
|
5
|
+
branches:
|
|
6
|
+
- tba
|
|
7
|
+
- dev
|
|
8
|
+
- main
|
|
9
|
+
|
|
10
|
+
defaults:
|
|
11
|
+
run:
|
|
12
|
+
shell: bash
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
pre-commit:
|
|
16
|
+
name: "Run pre-commit"
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
steps:
|
|
19
|
+
- uses: asottile/workflows/.github/actions/fast-checkout@v1.8.1
|
|
20
|
+
|
|
21
|
+
- name: Install uv and dependencies
|
|
22
|
+
uses: ./.github/actions/install-dependencies
|
|
23
|
+
with:
|
|
24
|
+
python-version: "3.13"
|
|
25
|
+
|
|
26
|
+
- name: Load pre-commit cache
|
|
27
|
+
id: cache-pre-commit
|
|
28
|
+
uses: actions/cache@v4
|
|
29
|
+
env:
|
|
30
|
+
cache-name: cache-pre-commit
|
|
31
|
+
with:
|
|
32
|
+
key: ${{ env.cache-name }}-${{ hashFiles('**/.pre-commit-config.yaml', '~/.cache/pre-commit/*') }}
|
|
33
|
+
path: ~/.cache/pre-commit
|
|
34
|
+
|
|
35
|
+
- name: Run pre-commit
|
|
36
|
+
run: uv run pre-commit run --all-files --color=always
|
|
37
|
+
|
|
38
|
+
- uses: pre-commit/action@v3.0.1
|
|
39
|
+
- uses: pre-commit-ci/lite-action@v1.1.0
|
|
40
|
+
if: always()
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
name: Push
|
|
2
|
+
|
|
3
|
+
'on':
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- dev
|
|
7
|
+
- main
|
|
8
|
+
|
|
9
|
+
defaults:
|
|
10
|
+
run:
|
|
11
|
+
shell: bash
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
ci:
|
|
15
|
+
name: "CI (Push)"
|
|
16
|
+
strategy:
|
|
17
|
+
matrix:
|
|
18
|
+
python-version:
|
|
19
|
+
- "3.12"
|
|
20
|
+
- "3.13"
|
|
21
|
+
os:
|
|
22
|
+
- ubuntu-latest
|
|
23
|
+
- windows-latest
|
|
24
|
+
|
|
25
|
+
uses: ./.github/workflows/ci.yml
|
|
26
|
+
with:
|
|
27
|
+
os: ${{ matrix.os }}
|
|
28
|
+
python-version: ${{ matrix.python-version }}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
name: Release to PyPI
|
|
2
|
+
|
|
3
|
+
'on':
|
|
4
|
+
release:
|
|
5
|
+
types:
|
|
6
|
+
- created
|
|
7
|
+
|
|
8
|
+
defaults:
|
|
9
|
+
run:
|
|
10
|
+
shell: bash
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
build:
|
|
14
|
+
name: "Build distribution"
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
steps:
|
|
17
|
+
- uses: asottile/workflows/.github/actions/fast-checkout@v1.8.1
|
|
18
|
+
|
|
19
|
+
- uses: ./.github/actions/install-dependencies
|
|
20
|
+
with:
|
|
21
|
+
python-version: "3.13"
|
|
22
|
+
|
|
23
|
+
- name: "Build distribution"
|
|
24
|
+
run: uv build
|
|
25
|
+
|
|
26
|
+
- uses: actions/upload-artifact@v4
|
|
27
|
+
with:
|
|
28
|
+
name: release-dist
|
|
29
|
+
path: dist/
|
|
30
|
+
|
|
31
|
+
pypi-publish:
|
|
32
|
+
name: "Publish to PyPI"
|
|
33
|
+
runs-on: ubuntu-latest
|
|
34
|
+
steps:
|
|
35
|
+
- uses: asottile/workflows/.github/actions/fast-checkout@v1.8.1
|
|
36
|
+
|
|
37
|
+
- name: Download artifact with distribution
|
|
38
|
+
uses: actions/download-artifact@v4
|
|
39
|
+
with:
|
|
40
|
+
name: release-dist
|
|
41
|
+
path: dist/
|
|
42
|
+
|
|
43
|
+
- name: Release distribution
|
|
44
|
+
uses: actions/checkout@v2
|
|
45
|
+
with:
|
|
46
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
|
47
|
+
tag: ${{ github.event.release.tag_name }}
|
|
48
|
+
files: dist/
|
|
49
|
+
|
|
50
|
+
- name: Publish distribution to PyPI
|
|
51
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
52
|
+
with:
|
|
53
|
+
password: ${{ secrets.PYPI_API_TOKEN }}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
name: Telegram Bot API schema
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch: {}
|
|
5
|
+
schedule:
|
|
6
|
+
- cron: "0 16 * * *"
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
lock-file:
|
|
10
|
+
name: "Lock uv"
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v4
|
|
14
|
+
|
|
15
|
+
- uses: ./.github/actions/install-dependencies
|
|
16
|
+
with:
|
|
17
|
+
python-version: "3.13"
|
|
18
|
+
|
|
19
|
+
- run: uv lock --locked
|
|
20
|
+
|
|
21
|
+
generation:
|
|
22
|
+
name: "TBA schema generation"
|
|
23
|
+
runs-on: ubuntu-latest
|
|
24
|
+
needs: lock-file
|
|
25
|
+
steps:
|
|
26
|
+
- uses: actions/checkout@v4
|
|
27
|
+
|
|
28
|
+
- uses: ./.github/actions/install-dependencies
|
|
29
|
+
with:
|
|
30
|
+
python-version: "3.13"
|
|
31
|
+
|
|
32
|
+
- name: "Run generator"
|
|
33
|
+
run: uv run typegen
|
|
34
|
+
|
|
35
|
+
- name: "Create PR"
|
|
36
|
+
uses: peter-evans/create-pull-request@v7
|
|
37
|
+
with:
|
|
38
|
+
author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
|
|
39
|
+
commit-message: >
|
|
40
|
+
types: Telegram Bot API schema changes
|
|
41
|
+
title: >
|
|
42
|
+
Update Telegram Bot API to the latest schema
|
|
43
|
+
body: >
|
|
44
|
+
This is an automated PR. Please check the diff, and the action logs, to check for any funky behavior.
|
|
45
|
+
branch: automated/tba
|
|
46
|
+
reviewers: luwqz1
|
|
47
|
+
assignees: luwqz1
|
|
48
|
+
labels: automated, TBA
|
|
49
|
+
delete-branch: true
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
pip-wheel-metadata/
|
|
24
|
+
share/python-wheels/
|
|
25
|
+
*.egg-info/
|
|
26
|
+
.installed.cfg
|
|
27
|
+
*.egg
|
|
28
|
+
MANIFEST
|
|
29
|
+
|
|
30
|
+
# PyInstaller
|
|
31
|
+
# Usually these files are written by a python script from a template
|
|
32
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
33
|
+
*.manifest
|
|
34
|
+
*.spec
|
|
35
|
+
|
|
36
|
+
# Installer logs
|
|
37
|
+
pip-log.txt
|
|
38
|
+
pip-delete-this-directory.txt
|
|
39
|
+
.idea
|
|
40
|
+
*.iml
|
|
41
|
+
|
|
42
|
+
# Unit test / coverage reports
|
|
43
|
+
htmlcov/
|
|
44
|
+
.tox/
|
|
45
|
+
.nox/
|
|
46
|
+
.coverage
|
|
47
|
+
.coverage.*
|
|
48
|
+
.cache
|
|
49
|
+
nosetests.xml
|
|
50
|
+
coverage.xml
|
|
51
|
+
*.cover
|
|
52
|
+
.hypothesis/
|
|
53
|
+
.pytest_cache/
|
|
54
|
+
|
|
55
|
+
# Translations
|
|
56
|
+
*.mo
|
|
57
|
+
*.pot
|
|
58
|
+
|
|
59
|
+
# Django stuff:
|
|
60
|
+
*.log
|
|
61
|
+
local_settings.py
|
|
62
|
+
db.sqlite3
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
target/
|
|
76
|
+
|
|
77
|
+
# Jupyter Notebook
|
|
78
|
+
.ipynb_checkpoints
|
|
79
|
+
|
|
80
|
+
# IPython
|
|
81
|
+
profile_default/
|
|
82
|
+
ipython_config.py
|
|
83
|
+
|
|
84
|
+
# pyenv
|
|
85
|
+
.python-version
|
|
86
|
+
|
|
87
|
+
# pipenv
|
|
88
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
89
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
90
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
91
|
+
# install all needed dependencies.
|
|
92
|
+
#Pipfile.lock
|
|
93
|
+
|
|
94
|
+
# celery beat schedule file
|
|
95
|
+
celerybeat-schedule
|
|
96
|
+
|
|
97
|
+
# SageMath parsed files
|
|
98
|
+
*.sage.py
|
|
99
|
+
|
|
100
|
+
# Environments
|
|
101
|
+
.env
|
|
102
|
+
.venv
|
|
103
|
+
venv/*
|
|
104
|
+
env/
|
|
105
|
+
venv/
|
|
106
|
+
ENV/
|
|
107
|
+
env.bak/
|
|
108
|
+
venv.bak/
|
|
109
|
+
|
|
110
|
+
# Spyder project settings
|
|
111
|
+
.spyderproject
|
|
112
|
+
.spyproject
|
|
113
|
+
|
|
114
|
+
# Rope project settings
|
|
115
|
+
.ropeproject
|
|
116
|
+
|
|
117
|
+
# mkdocs documentation
|
|
118
|
+
/site
|
|
119
|
+
|
|
120
|
+
# mypy
|
|
121
|
+
.mypy_cache/
|
|
122
|
+
.dmypy.json
|
|
123
|
+
dmypy.json
|
|
124
|
+
|
|
125
|
+
# Pyre type checker
|
|
126
|
+
.pyre/
|
|
127
|
+
|
|
128
|
+
# Mac OS trash
|
|
129
|
+
.DS_Store
|
|
130
|
+
|
|
131
|
+
# Test databases
|
|
132
|
+
*.db
|
|
133
|
+
.db
|
|
134
|
+
*.db-shm
|
|
135
|
+
*.db-wal
|
|
136
|
+
|
|
137
|
+
# pytest
|
|
138
|
+
.pytest_cache
|
|
139
|
+
|
|
140
|
+
# ruff
|
|
141
|
+
.ruff_cache
|
|
142
|
+
|
|
143
|
+
.vscode
|
|
144
|
+
local
|
|
145
|
+
|
|
146
|
+
pyvenv.cfg
|
|
147
|
+
|
|
148
|
+
.basedpyright
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
3
|
+
rev: v4.6.0
|
|
4
|
+
hooks:
|
|
5
|
+
- id: check-merge-conflict
|
|
6
|
+
stages: [ pre-commit, pre-push ]
|
|
7
|
+
- id: check-ast
|
|
8
|
+
stages: [ pre-commit ]
|
|
9
|
+
- id: trailing-whitespace
|
|
10
|
+
stages: [ pre-commit ]
|
|
11
|
+
- id: end-of-file-fixer
|
|
12
|
+
stages: [ pre-commit ]
|
|
13
|
+
|
|
14
|
+
- repo: local
|
|
15
|
+
hooks:
|
|
16
|
+
- id: uv
|
|
17
|
+
name: uv-lock
|
|
18
|
+
description: "Run uv lock"
|
|
19
|
+
entry: uv lock --locked
|
|
20
|
+
language: system
|
|
21
|
+
pass_filenames: false
|
|
22
|
+
types: [ python ]
|
|
23
|
+
stages: [ pre-commit ]
|
|
24
|
+
|
|
25
|
+
- id: basedpyright
|
|
26
|
+
name: basedpyright
|
|
27
|
+
description: "Run 'basedpyright' for Python type checking"
|
|
28
|
+
entry: uv run basedpyright --level error
|
|
29
|
+
pass_filenames: false
|
|
30
|
+
language: system
|
|
31
|
+
types: [ python ]
|
|
32
|
+
stages: [ pre-commit ]
|
|
33
|
+
|
|
34
|
+
- id: pytest
|
|
35
|
+
name: pytest
|
|
36
|
+
description: "Run tests for testing code"
|
|
37
|
+
entry: uv run pytest tests
|
|
38
|
+
language: system
|
|
39
|
+
pass_filenames: false
|
|
40
|
+
types: [ python ]
|
|
41
|
+
stages: [ pre-commit ]
|
|
42
|
+
|
|
43
|
+
- id: ruff
|
|
44
|
+
name: ruff-isort
|
|
45
|
+
description: "Run 'ruff check --select I --select F401 --fix' for extremely fast Python sorting imports"
|
|
46
|
+
entry: uv run ruff check --select I --select F401 --fix
|
|
47
|
+
language: system
|
|
48
|
+
types: [ python ]
|
|
49
|
+
stages: [ pre-commit ]
|
|
50
|
+
|
|
51
|
+
- id: ruff
|
|
52
|
+
name: ruff-sortall
|
|
53
|
+
description: "Run 'ruff check --select RUF022 --fix' for extremely fast Python sorting dunder alls"
|
|
54
|
+
entry: uv run ruff check --select RUF022 --fix
|
|
55
|
+
language: system
|
|
56
|
+
types: [ python ]
|
|
57
|
+
stages: [ pre-commit ]
|
|
58
|
+
|
|
59
|
+
- id: ruff
|
|
60
|
+
name: ruff-format
|
|
61
|
+
description: "Run 'ruff format' for extremely fast Python formatting"
|
|
62
|
+
entry: uv run ruff format
|
|
63
|
+
language: system
|
|
64
|
+
types: [ python ]
|
|
65
|
+
stages: [ pre-commit ]
|
|
66
|
+
|
|
67
|
+
- id: ruff
|
|
68
|
+
name: ruff-check
|
|
69
|
+
description: "Run 'ruff check --fix' for extremely fast Python linting"
|
|
70
|
+
entry: uv run ruff check --fix
|
|
71
|
+
language: system
|
|
72
|
+
types: [ python ]
|
|
73
|
+
stages: [ pre-commit ]
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
|
|
3
|
+
build:
|
|
4
|
+
os: ubuntu-22.04
|
|
5
|
+
tools:
|
|
6
|
+
python: "3.9"
|
|
7
|
+
commands:
|
|
8
|
+
- pip install mkdocs mkdocs-material mkdocs-redirects
|
|
9
|
+
- cat mkdocs.yml
|
|
10
|
+
- mkdocs build --clean --site-dir $READTHEDOCS_OUTPUT/html --config-file mkdocs.yml
|
|
11
|
+
|
|
12
|
+
mkdocs:
|
|
13
|
+
configuration: mkdocs.yml
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2022
|
|
4
|
-
Copyright (c) 2024
|
|
3
|
+
Copyright (c) 2022 timoniq
|
|
4
|
+
Copyright (c) 2024 luwqz1
|
|
5
5
|
|
|
6
6
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
7
|
of this software and associated documentation files (the "Software"), to deal
|