telegrinder 0.4.0__tar.gz → 0.4.1__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.4.0 → telegrinder-0.4.1}/PKG-INFO +1 -2
- {telegrinder-0.4.0 → telegrinder-0.4.1}/pyproject.toml +2 -4
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/cute_types/base.py +1 -1
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/msgspec_utils.py +2 -2
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/node/polymorphic.py +2 -2
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/tools/__init__.py +2 -2
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/tools/magic.py +76 -50
- {telegrinder-0.4.0 → telegrinder-0.4.1}/LICENSE +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/readme.md +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/__init__.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/api/__init__.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/api/api.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/api/error.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/api/response.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/api/token.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/__init__.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/bot.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/cute_types/__init__.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/cute_types/callback_query.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/cute_types/chat_join_request.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/cute_types/chat_member_updated.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/cute_types/inline_query.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/cute_types/message.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/cute_types/pre_checkout_query.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/cute_types/update.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/cute_types/utils.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/dispatch/__init__.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/dispatch/abc.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/dispatch/context.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/dispatch/dispatch.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/dispatch/handler/__init__.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/dispatch/handler/abc.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/dispatch/handler/audio_reply.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/dispatch/handler/base.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/dispatch/handler/document_reply.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/dispatch/handler/func.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/dispatch/handler/media_group_reply.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/dispatch/handler/message_reply.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/dispatch/handler/photo_reply.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/dispatch/handler/sticker_reply.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/dispatch/handler/video_reply.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/dispatch/middleware/__init__.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/dispatch/middleware/abc.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/dispatch/middleware/global_middleware.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/dispatch/process.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/dispatch/return_manager/__init__.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/dispatch/return_manager/abc.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/dispatch/return_manager/callback_query.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/dispatch/return_manager/inline_query.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/dispatch/return_manager/message.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/dispatch/return_manager/pre_checkout_query.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/dispatch/view/__init__.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/dispatch/view/abc.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/dispatch/view/base.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/dispatch/view/box.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/dispatch/view/callback_query.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/dispatch/view/chat_join_request.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/dispatch/view/chat_member.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/dispatch/view/inline_query.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/dispatch/view/message.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/dispatch/view/pre_checkout_query.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/dispatch/view/raw.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/dispatch/waiter_machine/__init__.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/dispatch/waiter_machine/actions.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/dispatch/waiter_machine/hasher/__init__.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/dispatch/waiter_machine/hasher/callback.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/dispatch/waiter_machine/hasher/hasher.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/dispatch/waiter_machine/hasher/message.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/dispatch/waiter_machine/hasher/state.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/dispatch/waiter_machine/machine.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/dispatch/waiter_machine/middleware.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/dispatch/waiter_machine/short_state.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/polling/__init__.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/polling/abc.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/polling/polling.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/rules/__init__.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/rules/abc.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/rules/callback_data.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/rules/chat_join.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/rules/command.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/rules/enum_text.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/rules/func.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/rules/fuzzy.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/rules/id.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/rules/inline.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/rules/integer.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/rules/is_from.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/rules/logic.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/rules/markup.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/rules/mention.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/rules/message.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/rules/message_entities.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/rules/node.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/rules/payload.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/rules/payment_invoice.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/rules/regex.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/rules/rule_enum.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/rules/start.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/rules/state.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/rules/text.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/rules/update.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/scenario/__init__.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/scenario/abc.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/scenario/checkbox.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/scenario/choice.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/client/__init__.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/client/abc.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/client/aiohttp.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/client/form_data.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/client/sonic.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/model.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/modules.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/msgspec_json.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/node/__init__.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/node/attachment.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/node/base.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/node/callback_query.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/node/command.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/node/composer.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/node/container.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/node/either.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/node/event.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/node/file.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/node/me.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/node/payload.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/node/rule.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/node/scope.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/node/source.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/node/text.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/node/tools/__init__.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/node/tools/generator.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/py.typed +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/rules.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/tools/adapter/__init__.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/tools/adapter/abc.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/tools/adapter/dataclass.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/tools/adapter/errors.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/tools/adapter/event.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/tools/adapter/node.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/tools/adapter/raw_event.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/tools/adapter/raw_update.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/tools/buttons.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/tools/callback_data_serilization/__init__.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/tools/callback_data_serilization/abc.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/tools/callback_data_serilization/json_ser.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/tools/callback_data_serilization/msgpack_ser.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/tools/error_handler/__init__.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/tools/error_handler/abc.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/tools/error_handler/error.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/tools/error_handler/error_handler.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/tools/formatting/__init__.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/tools/formatting/deep_links.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/tools/formatting/html_formatter.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/tools/formatting/spec_html_formats.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/tools/functional.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/tools/global_context/__init__.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/tools/global_context/abc.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/tools/global_context/global_context.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/tools/global_context/telegrinder_ctx.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/tools/i18n/__init__.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/tools/i18n/abc.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/tools/i18n/middleware/__init__.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/tools/i18n/middleware/abc.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/tools/i18n/simple.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/tools/input_file_directory.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/tools/keyboard.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/tools/lifespan.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/tools/limited_dict.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/tools/loop_wrapper/__init__.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/tools/loop_wrapper/abc.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/tools/loop_wrapper/loop_wrapper.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/tools/parse_mode.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/tools/state_storage/__init__.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/tools/state_storage/abc.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/tools/state_storage/memory.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/tools/strings.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/types/__init__.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/types/enums.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/types/input_file.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/types/methods.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/types/objects.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/verification_utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: telegrinder
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.1
|
|
4
4
|
Summary: Modern visionary telegram bot framework.
|
|
5
5
|
License: MIT License
|
|
6
6
|
|
|
@@ -51,7 +51,6 @@ Requires-Dist: fntypes (>=0.1.4.post3,<0.2.0)
|
|
|
51
51
|
Requires-Dist: loguru (>=0.7.0) ; extra == "all"
|
|
52
52
|
Requires-Dist: loguru (>=0.7.0) ; extra == "loguru"
|
|
53
53
|
Requires-Dist: msgspec (>=0.19.0,<0.20.0)
|
|
54
|
-
Requires-Dist: pyyaml (>=6.0.2,<7.0.0)
|
|
55
54
|
Requires-Dist: typing-extensions (>=4.12.2,<5.0.0)
|
|
56
55
|
Requires-Dist: uvloop (>=0.21.0) ; extra == "all"
|
|
57
56
|
Requires-Dist: uvloop (>=0.21.0) ; extra == "fast"
|
|
@@ -5,7 +5,7 @@ build-backend = "poetry.core.masonry.api"
|
|
|
5
5
|
[project]
|
|
6
6
|
requires-python = ">=3.12,<4.0"
|
|
7
7
|
name = "telegrinder"
|
|
8
|
-
version = "0.4.
|
|
8
|
+
version = "0.4.1"
|
|
9
9
|
description = "Modern visionary telegram bot framework."
|
|
10
10
|
authors = [
|
|
11
11
|
{name = "timoniq", email = "tesseradecades@mail.ru"}
|
|
@@ -47,7 +47,6 @@ dependencies = [
|
|
|
47
47
|
"vbml (>=1.1.post1,<2.0)",
|
|
48
48
|
"choicelib (>=0.1.5,<0.2.0)",
|
|
49
49
|
"envparse (>=0.2.0,<0.3.0)",
|
|
50
|
-
"pyyaml (>=6.0.2,<7.0.0)",
|
|
51
50
|
"certifi (>=2025.1.31)",
|
|
52
51
|
"msgspec (>=0.19.0,<0.20.0)",
|
|
53
52
|
"typing-extensions (>=4.12.2,<5.0.0)",
|
|
@@ -80,7 +79,7 @@ package-mode = true
|
|
|
80
79
|
[tool.poetry.group.dev.dependencies]
|
|
81
80
|
pre-commit = ">=4.1.0,<5.0"
|
|
82
81
|
ruff = "^0.9.2"
|
|
83
|
-
basedpyright = "^1.
|
|
82
|
+
basedpyright = "^1.28.1"
|
|
84
83
|
requests = "^2.28.1"
|
|
85
84
|
sort-all = "^1.2.0"
|
|
86
85
|
libcst = "^1.4.0"
|
|
@@ -161,4 +160,3 @@ pythonPlatform = "All"
|
|
|
161
160
|
pythonVersion = "3.12"
|
|
162
161
|
reportMissingImports = true
|
|
163
162
|
reportMissingTypeStubs = false
|
|
164
|
-
enableExperimentalFeatures = true
|
|
@@ -261,7 +261,7 @@ class Decoder:
|
|
|
261
261
|
f"Unknown type `{repr_type(origin_type)}`. You can implement decode hook for this type."
|
|
262
262
|
)
|
|
263
263
|
dec_hook_func = self.dec_hooks[origin_type]
|
|
264
|
-
kwargs = magic_bundle(dec_hook_func, context or {}, start_idx=2
|
|
264
|
+
kwargs = magic_bundle(dec_hook_func, context or {}, start_idx=2)
|
|
265
265
|
return dec_hook_func(tp, obj, **kwargs)
|
|
266
266
|
|
|
267
267
|
return inner
|
|
@@ -400,7 +400,7 @@ class Encoder:
|
|
|
400
400
|
f"Not implemented encode hook for object of type `{repr_type(origin_type)}`.",
|
|
401
401
|
)
|
|
402
402
|
enc_hook_func = self.enc_hooks[origin_type]
|
|
403
|
-
kwargs = magic_bundle(enc_hook_func, context or {}, start_idx=1
|
|
403
|
+
kwargs = magic_bundle(enc_hook_func, context or {}, start_idx=1)
|
|
404
404
|
return enc_hook_func(obj, **kwargs)
|
|
405
405
|
|
|
406
406
|
return inner
|
|
@@ -10,7 +10,7 @@ from telegrinder.modules import logger
|
|
|
10
10
|
from telegrinder.node.base import ComposeError, Node, get_nodes
|
|
11
11
|
from telegrinder.node.composer import CONTEXT_STORE_NODES_KEY, NodeSession, compose_nodes
|
|
12
12
|
from telegrinder.node.scope import NodeScope
|
|
13
|
-
from telegrinder.tools.magic import
|
|
13
|
+
from telegrinder.tools.magic import get_polymorphic_implementations, impl, magic_bundle
|
|
14
14
|
from telegrinder.types.objects import Update
|
|
15
15
|
|
|
16
16
|
|
|
@@ -26,7 +26,7 @@ class Polymorphic(Node):
|
|
|
26
26
|
Update: raw_update,
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
for i, impl_ in enumerate(
|
|
29
|
+
for i, impl_ in enumerate(get_polymorphic_implementations(cls)):
|
|
30
30
|
logger.debug("Checking impl {!r}...", impl_.__name__)
|
|
31
31
|
node_collection = None
|
|
32
32
|
|
|
@@ -95,7 +95,7 @@ from .magic import (
|
|
|
95
95
|
get_cached_translation,
|
|
96
96
|
get_default_args,
|
|
97
97
|
get_func_parameters,
|
|
98
|
-
|
|
98
|
+
get_polymorphic_implementations,
|
|
99
99
|
impl,
|
|
100
100
|
magic_bundle,
|
|
101
101
|
resolve_arg_names,
|
|
@@ -165,7 +165,7 @@ __all__ = (
|
|
|
165
165
|
"get_cached_translation",
|
|
166
166
|
"get_default_args",
|
|
167
167
|
"get_func_parameters",
|
|
168
|
-
"
|
|
168
|
+
"get_polymorphic_implementations",
|
|
169
169
|
"impl",
|
|
170
170
|
"italic",
|
|
171
171
|
"link",
|
|
@@ -4,11 +4,10 @@ import asyncio
|
|
|
4
4
|
import dataclasses
|
|
5
5
|
import enum
|
|
6
6
|
import inspect
|
|
7
|
-
import types
|
|
8
|
-
import typing
|
|
9
7
|
from collections import OrderedDict
|
|
10
8
|
from functools import wraps
|
|
11
9
|
|
|
10
|
+
import typing_extensions as typing
|
|
12
11
|
from fntypes import Result
|
|
13
12
|
|
|
14
13
|
from telegrinder.model import get_params
|
|
@@ -18,56 +17,67 @@ if typing.TYPE_CHECKING:
|
|
|
18
17
|
from telegrinder.node.polymorphic import Polymorphic
|
|
19
18
|
|
|
20
19
|
type Impl = type[classmethod]
|
|
21
|
-
type
|
|
22
|
-
|
|
20
|
+
type Function = typing.Callable[..., typing.Any]
|
|
23
21
|
type Executor[T] = typing.Callable[
|
|
24
22
|
[T, str, dict[str, typing.Any]],
|
|
25
23
|
typing.Awaitable[Result[typing.Any, typing.Any]],
|
|
26
24
|
]
|
|
27
25
|
|
|
28
26
|
TRANSLATIONS_KEY: typing.Final[str] = "_translations"
|
|
27
|
+
MORPH_IMPLEMENTATIONS_KEY = "__morph_implementations__"
|
|
29
28
|
IMPL_MARK: typing.Final[str] = "_is_impl"
|
|
29
|
+
CONTEXT_KEYS: typing.Final[tuple[str, ...]] = ("ctx", "context")
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class FuncParams(typing.TypedDict, total=True):
|
|
33
|
+
args: list[tuple[str, typing.Any | inspect.Parameter.empty]]
|
|
34
|
+
kwargs: list[tuple[str, typing.Any | inspect.Parameter.empty]]
|
|
35
|
+
var_args: typing.NotRequired[str]
|
|
36
|
+
var_kwargs: typing.NotRequired[str]
|
|
30
37
|
|
|
31
38
|
|
|
32
39
|
@dataclasses.dataclass(slots=True, frozen=True)
|
|
33
40
|
class Shortcut[T]:
|
|
34
41
|
method_name: str
|
|
35
42
|
executor: Executor[T] | None = dataclasses.field(default=None, kw_only=True)
|
|
36
|
-
custom_params: set[str] = dataclasses.field(default_factory=lambda: set(), kw_only=True)
|
|
43
|
+
custom_params: set[str] = dataclasses.field(default_factory=lambda: set[str](), kw_only=True)
|
|
37
44
|
|
|
38
45
|
|
|
39
46
|
def cache_magic_value(mark_key: str, /):
|
|
40
47
|
def inner[Func: typing.Callable[..., typing.Any]](func: Func) -> Func:
|
|
41
48
|
@wraps(func)
|
|
42
|
-
def wrapper(
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
49
|
+
def wrapper(
|
|
50
|
+
f: Function | None = None,
|
|
51
|
+
/,
|
|
52
|
+
*args: typing.Any,
|
|
53
|
+
**kwargs: typing.Any,
|
|
54
|
+
) -> typing.Any:
|
|
55
|
+
if f is not None and mark_key not in f.__dict__:
|
|
56
|
+
f.__dict__[mark_key] = func(f, *args, **kwargs)
|
|
57
|
+
return f.__dict__[mark_key]
|
|
46
58
|
|
|
47
59
|
return wrapper # type: ignore
|
|
48
60
|
|
|
49
61
|
return inner
|
|
50
62
|
|
|
51
63
|
|
|
52
|
-
def resolve_arg_names(func:
|
|
64
|
+
def resolve_arg_names(func: Function, start_idx: int = 1) -> tuple[str, ...]:
|
|
53
65
|
return func.__code__.co_varnames[start_idx : func.__code__.co_argcount]
|
|
54
66
|
|
|
55
67
|
|
|
56
|
-
@cache_magic_value("
|
|
57
|
-
def get_default_args(func:
|
|
58
|
-
kwdefaults = func.__kwdefaults__
|
|
59
|
-
if kwdefaults:
|
|
60
|
-
return kwdefaults
|
|
61
|
-
|
|
68
|
+
@cache_magic_value("__default_arguments__")
|
|
69
|
+
def get_default_args(func: Function, /) -> dict[str, typing.Any]:
|
|
62
70
|
defaults = func.__defaults__
|
|
71
|
+
kwdefaults = {} if not func.__kwdefaults__ else func.__kwdefaults__.copy()
|
|
63
72
|
if not defaults:
|
|
64
|
-
return
|
|
65
|
-
|
|
66
|
-
|
|
73
|
+
return kwdefaults
|
|
74
|
+
return {
|
|
75
|
+
k: defaults[i] for i, k in enumerate(resolve_arg_names(func, start_idx=0)[-len(defaults) :])
|
|
76
|
+
} | kwdefaults
|
|
67
77
|
|
|
68
78
|
|
|
69
|
-
@cache_magic_value("
|
|
70
|
-
def get_func_parameters(func:
|
|
79
|
+
@cache_magic_value("__function_parameters__")
|
|
80
|
+
def get_func_parameters(func: Function, /) -> FuncParams:
|
|
71
81
|
func_params: FuncParams = {"args": [], "kwargs": []}
|
|
72
82
|
|
|
73
83
|
for k, p in inspect.signature(func).parameters.items():
|
|
@@ -87,8 +97,8 @@ def get_func_parameters(func: FuncType, /) -> FuncParams:
|
|
|
87
97
|
return func_params
|
|
88
98
|
|
|
89
99
|
|
|
90
|
-
def get_annotations(func:
|
|
91
|
-
annotations = func.__annotations__
|
|
100
|
+
def get_annotations(func: Function, *, return_type: bool = False) -> dict[str, typing.Any]:
|
|
101
|
+
annotations = func.__annotations__.copy()
|
|
92
102
|
if not return_type:
|
|
93
103
|
annotations.pop("return", None)
|
|
94
104
|
return annotations
|
|
@@ -101,49 +111,66 @@ def to_str(s: str | enum.Enum) -> str:
|
|
|
101
111
|
|
|
102
112
|
|
|
103
113
|
@typing.overload
|
|
104
|
-
def magic_bundle(
|
|
114
|
+
def magic_bundle(
|
|
115
|
+
function: Function,
|
|
116
|
+
kw: dict[str, typing.Any],
|
|
117
|
+
*,
|
|
118
|
+
start_idx: int = 1,
|
|
119
|
+
omit_defaults: bool = False,
|
|
120
|
+
) -> dict[str, typing.Any]: ...
|
|
105
121
|
|
|
106
122
|
|
|
107
123
|
@typing.overload
|
|
108
|
-
def magic_bundle(
|
|
124
|
+
def magic_bundle(
|
|
125
|
+
function: Function,
|
|
126
|
+
kw: dict[enum.Enum, typing.Any],
|
|
127
|
+
*,
|
|
128
|
+
start_idx: int = 1,
|
|
129
|
+
omit_defaults: bool = False,
|
|
130
|
+
) -> dict[str, typing.Any]: ...
|
|
109
131
|
|
|
110
132
|
|
|
111
133
|
@typing.overload
|
|
112
134
|
def magic_bundle(
|
|
113
|
-
function:
|
|
135
|
+
function: Function,
|
|
114
136
|
kw: dict[str, typing.Any],
|
|
115
137
|
*,
|
|
116
138
|
start_idx: int = 1,
|
|
117
|
-
bundle_ctx: bool =
|
|
139
|
+
bundle_ctx: bool = False,
|
|
140
|
+
omit_defaults: bool = False,
|
|
118
141
|
) -> dict[str, typing.Any]: ...
|
|
119
142
|
|
|
120
143
|
|
|
121
144
|
@typing.overload
|
|
122
145
|
def magic_bundle(
|
|
123
|
-
function:
|
|
146
|
+
function: Function,
|
|
124
147
|
kw: dict[enum.Enum, typing.Any],
|
|
125
148
|
*,
|
|
126
149
|
start_idx: int = 1,
|
|
127
|
-
bundle_ctx: bool =
|
|
150
|
+
bundle_ctx: bool = False,
|
|
151
|
+
omit_defaults: bool = False,
|
|
128
152
|
) -> dict[str, typing.Any]: ...
|
|
129
153
|
|
|
130
154
|
|
|
131
155
|
@typing.overload
|
|
132
156
|
def magic_bundle(
|
|
133
|
-
function:
|
|
157
|
+
function: Function,
|
|
134
158
|
kw: dict[type[typing.Any], typing.Any],
|
|
135
159
|
*,
|
|
160
|
+
start_idx: int = 1,
|
|
136
161
|
typebundle: typing.Literal[True] = True,
|
|
162
|
+
omit_defaults: bool = False,
|
|
137
163
|
) -> dict[str, typing.Any]: ...
|
|
138
164
|
|
|
139
165
|
|
|
140
166
|
def magic_bundle(
|
|
141
|
-
function:
|
|
167
|
+
function: Function,
|
|
142
168
|
kw: dict[typing.Any, typing.Any],
|
|
143
169
|
*,
|
|
144
170
|
start_idx: int = 1,
|
|
145
|
-
bundle_ctx: bool =
|
|
171
|
+
bundle_ctx: bool = False,
|
|
146
172
|
typebundle: bool = False,
|
|
173
|
+
omit_defaults: bool = False,
|
|
147
174
|
) -> dict[str, typing.Any]:
|
|
148
175
|
# Bundle considering the function annotations
|
|
149
176
|
if typebundle:
|
|
@@ -154,10 +181,16 @@ def magic_bundle(
|
|
|
154
181
|
if "var_kwargs" in get_func_parameters(function) and not names:
|
|
155
182
|
return {to_str(k): v for k, v in kw.items()}
|
|
156
183
|
|
|
157
|
-
# Bundle considering the function parameters and defaults
|
|
158
|
-
|
|
159
|
-
if
|
|
160
|
-
|
|
184
|
+
# Bundle considering the function parameters and defaults (if do not omit defaults)
|
|
185
|
+
defaults = {} if omit_defaults else get_default_args(function)
|
|
186
|
+
args = defaults | {n: v for k, v in kw.items() if (n := to_str(k)) in names}
|
|
187
|
+
|
|
188
|
+
# Bundle a context if context key specified in `names`
|
|
189
|
+
if bundle_ctx:
|
|
190
|
+
for key in CONTEXT_KEYS:
|
|
191
|
+
if key in names:
|
|
192
|
+
args[key] = kw
|
|
193
|
+
break
|
|
161
194
|
|
|
162
195
|
return args
|
|
163
196
|
|
|
@@ -189,30 +222,23 @@ def impl(method: typing.Callable[..., typing.Any]):
|
|
|
189
222
|
return classmethod(method)
|
|
190
223
|
|
|
191
224
|
|
|
192
|
-
def
|
|
193
|
-
moprh_impls = getattr(cls,
|
|
225
|
+
def get_polymorphic_implementations(cls: type[Polymorphic], /) -> list[typing.Callable[..., typing.Any]]:
|
|
226
|
+
moprh_impls = getattr(cls, MORPH_IMPLEMENTATIONS_KEY, None)
|
|
194
227
|
if moprh_impls is not None:
|
|
195
228
|
return moprh_impls
|
|
196
229
|
|
|
197
230
|
impls = []
|
|
198
231
|
for cls_ in cls.mro():
|
|
199
232
|
impls += [
|
|
200
|
-
|
|
201
|
-
for
|
|
202
|
-
if isinstance(
|
|
233
|
+
obj.__func__
|
|
234
|
+
for obj in vars(cls_).values()
|
|
235
|
+
if isinstance(obj, classmethod) and getattr(obj.__func__, IMPL_MARK, False)
|
|
203
236
|
]
|
|
204
237
|
|
|
205
|
-
setattr(cls,
|
|
238
|
+
setattr(cls, MORPH_IMPLEMENTATIONS_KEY, impls)
|
|
206
239
|
return impls
|
|
207
240
|
|
|
208
241
|
|
|
209
|
-
class FuncParams(typing.TypedDict, total=True):
|
|
210
|
-
args: list[tuple[str, typing.Any | inspect.Parameter.empty]]
|
|
211
|
-
kwargs: list[tuple[str, typing.Any | inspect.Parameter.empty]]
|
|
212
|
-
var_args: typing.NotRequired[str]
|
|
213
|
-
var_kwargs: typing.NotRequired[str]
|
|
214
|
-
|
|
215
|
-
|
|
216
242
|
def shortcut[T](
|
|
217
243
|
method_name: str,
|
|
218
244
|
*,
|
|
@@ -308,7 +334,7 @@ __all__ = (
|
|
|
308
334
|
"get_default_args",
|
|
309
335
|
"get_default_args",
|
|
310
336
|
"get_func_parameters",
|
|
311
|
-
"
|
|
337
|
+
"get_polymorphic_implementations",
|
|
312
338
|
"impl",
|
|
313
339
|
"join_dicts",
|
|
314
340
|
"magic_bundle",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/dispatch/handler/media_group_reply.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/dispatch/middleware/global_middleware.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/dispatch/return_manager/callback_query.py
RENAMED
|
File without changes
|
{telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/dispatch/return_manager/inline_query.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/dispatch/waiter_machine/hasher/__init__.py
RENAMED
|
File without changes
|
{telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/dispatch/waiter_machine/hasher/callback.py
RENAMED
|
File without changes
|
{telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/dispatch/waiter_machine/hasher/hasher.py
RENAMED
|
File without changes
|
{telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/dispatch/waiter_machine/hasher/message.py
RENAMED
|
File without changes
|
{telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/dispatch/waiter_machine/hasher/state.py
RENAMED
|
File without changes
|
|
File without changes
|
{telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/dispatch/waiter_machine/middleware.py
RENAMED
|
File without changes
|
{telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/bot/dispatch/waiter_machine/short_state.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/tools/callback_data_serilization/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/tools/callback_data_serilization/json_ser.py
RENAMED
|
File without changes
|
{telegrinder-0.4.0 → telegrinder-0.4.1}/telegrinder/tools/callback_data_serilization/msgpack_ser.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|