telekit 2.6.0a3__tar.gz → 2.6.0a4__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.
- {telekit-2.6.0a3 → telekit-2.6.0a4}/PKG-INFO +19 -8
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/_handler.py +36 -1
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/_version.py +1 -1
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/traits/track_handoff_origin.py +63 -25
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit.egg-info/PKG-INFO +19 -8
- {telekit-2.6.0a3 → telekit-2.6.0a4}/LICENSE +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/README.md +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/setup.cfg +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/setup.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/__init__.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/_buildtext/__init__.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/_buildtext/formatter.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/_buildtext/styles.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/_callback_query_handler.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/_chain.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/_chain_base.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/_chain_entry_logic.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/_chain_inline_keyboards_logic.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/_chapters/__init__.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/_chapters/chapters.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/_init.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/_inline_buttons.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/_inline_keyboard.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/_input_handler.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/_logger.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/_on.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/_reply_keyboard.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/_rich.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/_snapvault/__init__.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/_snapvault/snapcode.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/_snapvault/snapvault.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/_state.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/_telekit_dsl/__init__.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/_telekit_dsl/mixin.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/_telekit_dsl/parser/__init__.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/_telekit_dsl/parser/builder.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/_telekit_dsl/parser/canvas_parser.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/_telekit_dsl/parser/lexer.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/_telekit_dsl/parser/nodes.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/_telekit_dsl/parser/parser.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/_telekit_dsl/parser/token.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/_telekit_dsl/telekit_dsl.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/_telekit_dsl/telekit_orm.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/_text_builder.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/_timeout.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/_trait.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/_user.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/chat.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/debug.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/dices.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/example/__init__.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/example/example_handlers/__init__.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/example/example_handlers/article.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/example/example_handlers/calendar.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/example/example_handlers/complete_hotel.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/example/example_handlers/counter.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/example/example_handlers/dsl.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/example/example_handlers/entry.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/example/example_handlers/faq.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/example/example_handlers/hotel.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/example/example_handlers/on_text.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/example/example_handlers/pages.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/example/example_handlers/pyapi.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/example/example_handlers/qr.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/example/example_handlers/quiz.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/example/example_handlers/rich.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/example/example_handlers/spells.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/example/example_handlers/start.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/example/example_handlers/style.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/example/example_handlers/text_document.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/example/example_server.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/html_text.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/inline_buttons.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/parameters.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/reply_buttons.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/scheduler.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/senders.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/server.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/styles.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/traits/__init__.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/traits/calendar_pick.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/traits/paginated_choice.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/traits/paginated_text.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/types.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit/utils.py +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit.egg-info/SOURCES.txt +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit.egg-info/dependency_links.txt +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit.egg-info/requires.txt +0 -0
- {telekit-2.6.0a3 → telekit-2.6.0a4}/telekit.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: telekit
|
|
3
|
-
Version: 2.6.
|
|
3
|
+
Version: 2.6.0a4
|
|
4
4
|
Summary: Declarative, developer-friendly framework for building Telegram bots
|
|
5
5
|
Home-page: https://github.com/Romashkaa/telekit
|
|
6
6
|
Author: romashka
|
|
@@ -471,19 +471,30 @@ Telekit focuses on one job: making Telegram bot development easier.
|
|
|
471
471
|
|
|
472
472
|
---
|
|
473
473
|
|
|
474
|
-
# Changes in version 2.6.
|
|
474
|
+
# Changes in version 2.6.0a4
|
|
475
|
+
|
|
476
|
+
### v2.6.0 `a4`
|
|
477
|
+
- Added `handle_handoff()` to `Handler`: a shortcut for `handoff(handler).handle()` that takes the target handler as an argument, so it can be passed to `add_callback()` without an extra closure
|
|
478
|
+
- Added `handle_handoff_back_or()` to `TrackHandoffOrigin`: a closure-free counterpart of `handoff_back_or()`
|
|
479
|
+
- Reworked `handoff_back_or()` as a thin `functools.partial` wrapper around `handle_handoff_back_or()`
|
|
480
|
+
- Fixed the `handoff_back_or()` docstring: the returned callable forwards its arguments to `handle()` instead of being zero-argument
|
|
481
|
+
- Converted the `handoff()` docstring to reST
|
|
475
482
|
|
|
476
483
|
### v2.6.0 `a3`
|
|
477
|
-
- Added support for Rich HTML messages (Bot API 10.1+)
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
484
|
+
- Added support for Rich HTML messages (Bot API 10.1+)
|
|
485
|
+
- Added the `_rich.py` module for Rich HTML parsing and serialization
|
|
486
|
+
- Added new rich tags to `styles.py` for enhanced text formatting
|
|
487
|
+
- Added the `rich.py` example handler demonstrating Rich HTML: inline styles, blocks, lists, tables, media, and sender integration
|
|
481
488
|
|
|
482
489
|
### v2.6.0 `a2`
|
|
483
|
-
- Reworked `.env` and token/canvas file reading in `utils
|
|
490
|
+
- Reworked `.env` and token/canvas file reading in `utils`
|
|
491
|
+
- Added full `.env` syntax support: comments, `export`, quotes and escapes, multi-line values, `$VAR` interpolation
|
|
492
|
+
- Added the `cache` parameter (default `True`) and `clear_cache()`
|
|
493
|
+
- Added detailed errors with fix suggestions and creation commands, and new `Env*Error` exceptions
|
|
494
|
+
- Changed `load_env()` to raise `EnvFileNotFoundError` for a missing file instead of returning `{}`
|
|
484
495
|
|
|
485
496
|
### v2.6.0 `a1`
|
|
486
|
-
- Added a module-loading utility
|
|
497
|
+
- Added a module-loading utility to `utils`
|
|
487
498
|
|
|
488
499
|
### v2.6.0 `a0`
|
|
489
500
|
- Improved formatting in `_on.py`
|
|
@@ -242,10 +242,45 @@ class Handler:
|
|
|
242
242
|
def _on_handoff(self, origin: "Handler") -> None:
|
|
243
243
|
"""Called when this handler is reached via handoff(). Override to customize."""
|
|
244
244
|
pass
|
|
245
|
-
|
|
245
|
+
|
|
246
|
+
def handle_handoff(self, handler: type["Handler"] | str):
|
|
247
|
+
"""
|
|
248
|
+
Transfers control to another handler and immediately runs its ``handle()``.
|
|
249
|
+
|
|
250
|
+
This is a shortcut for ``self.handoff(handler).handle()``. The target
|
|
251
|
+
handler is created via :meth:`handoff`, so it inherits the same initial
|
|
252
|
+
user message and the previous chain message (which allows editing it).
|
|
253
|
+
|
|
254
|
+
Unlike ``self.handoff(handler).handle``, it takes the target handler as
|
|
255
|
+
an argument, so it can be passed directly as a callback together with
|
|
256
|
+
its arguments, without creating an extra closure::
|
|
257
|
+
|
|
258
|
+
self.chain.add_callback(
|
|
259
|
+
"Settings",
|
|
260
|
+
self.handle_handoff, [SettingsHandler],
|
|
261
|
+
)
|
|
262
|
+
|
|
263
|
+
It can also be called directly::
|
|
264
|
+
|
|
265
|
+
self.handle_handoff(SettingsHandler)
|
|
266
|
+
self.handle_handoff("SettingsHandler")
|
|
267
|
+
|
|
268
|
+
:param handler: Target handler name or ``Handler`` subclass to transfer
|
|
269
|
+
control to.
|
|
270
|
+
:type handler: str | type[Handler]
|
|
271
|
+
|
|
272
|
+
:raises NameError: If a string name is provided but no registered
|
|
273
|
+
handler exists with that name.
|
|
274
|
+
:raises TypeError: If the provided value is not a ``Handler`` subclass.
|
|
275
|
+
|
|
276
|
+
.. seealso:: :meth:`handoff`
|
|
277
|
+
"""
|
|
278
|
+
self.handoff(handler).handle()
|
|
246
279
|
|
|
247
280
|
def freeze(self, func, *args):
|
|
248
281
|
"""
|
|
282
|
+
DEPRECATED
|
|
283
|
+
|
|
249
284
|
Return a zero-argument callback that invokes the given function
|
|
250
285
|
with the provided arguments.
|
|
251
286
|
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
from functools import partial
|
|
1
2
|
from typing import Callable
|
|
2
3
|
|
|
3
4
|
import telekit
|
|
4
5
|
|
|
6
|
+
|
|
5
7
|
class TrackHandoffOrigin(telekit.Trait):
|
|
6
8
|
|
|
7
9
|
TRACK_HANDOFF_ORIGIN: bool = True
|
|
@@ -29,71 +31,107 @@ class TrackHandoffOrigin(telekit.Trait):
|
|
|
29
31
|
- ``False`` if this handler was invoked directly.
|
|
30
32
|
"""
|
|
31
33
|
return self.handoff_origin is not None
|
|
32
|
-
|
|
34
|
+
|
|
33
35
|
def handoff_back(self, *args, **kwargs):
|
|
34
36
|
"""
|
|
35
37
|
Transfer control back to the handler that handed off to this one.
|
|
36
38
|
|
|
37
39
|
Useful for implementing "« Back" buttons without hardcoding the
|
|
38
|
-
previous handler class
|
|
40
|
+
previous handler class::
|
|
39
41
|
|
|
40
|
-
.. code-block:: python
|
|
41
42
|
self.chain.set_inline_keyboard({
|
|
42
43
|
"« Back": self.handoff_back
|
|
43
44
|
})
|
|
44
45
|
|
|
45
46
|
Any positional or keyword arguments are forwarded directly to
|
|
46
|
-
``handoff_origin.handle()
|
|
47
|
+
``handoff_origin.handle()``::
|
|
47
48
|
|
|
48
|
-
.. code-block:: python
|
|
49
49
|
self.handoff_back("some_arg", key="value")
|
|
50
50
|
# equivalent to: handoff_origin.handle("some_arg", key="value")
|
|
51
51
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
(i.e. ``handoff_origin`` is ``None``).
|
|
52
|
+
:raises RuntimeError: If this handler was not reached via
|
|
53
|
+
:meth:`handoff` (i.e. ``handoff_origin`` is ``None``).
|
|
55
54
|
"""
|
|
56
55
|
if self.handoff_origin is None:
|
|
57
56
|
raise RuntimeError(
|
|
58
57
|
f"{type(self).__name__}().handoff_back() called, but this handler "
|
|
59
58
|
"was not reached via handoff() - handoff_origin is None."
|
|
60
59
|
)
|
|
61
|
-
|
|
62
60
|
self.handoff_origin.chain._set_previous_message(self.chain.get_previous_message())
|
|
63
61
|
self.handoff_origin.handle(*args, **kwargs)
|
|
64
62
|
|
|
63
|
+
def handle_handoff_back_or(
|
|
64
|
+
self,
|
|
65
|
+
handler: type[telekit.Handler] | str,
|
|
66
|
+
*args,
|
|
67
|
+
**kwargs,
|
|
68
|
+
) -> None:
|
|
69
|
+
"""
|
|
70
|
+
Transfer control back to the origin handler, or to ``handler`` if
|
|
71
|
+
this handler was invoked directly, and immediately run its ``handle()``.
|
|
72
|
+
|
|
73
|
+
Unlike :meth:`handoff_back_or`, it takes the fallback handler as an
|
|
74
|
+
argument, so it can be passed directly as a callback together with
|
|
75
|
+
its arguments, without creating an extra closure::
|
|
76
|
+
|
|
77
|
+
self.chain.add_callback(
|
|
78
|
+
"« Back",
|
|
79
|
+
self.handle_handoff_back_or,
|
|
80
|
+
[StartHandler],
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
It can also be called directly. Any extra positional or keyword
|
|
84
|
+
arguments are forwarded to ``handle()`` of whichever handler is
|
|
85
|
+
invoked::
|
|
86
|
+
|
|
87
|
+
self.handle_handoff_back_or(StartHandler, "some_arg", key="value")
|
|
88
|
+
# if handed off: handoff_origin.handle("some_arg", key="value")
|
|
89
|
+
# if direct: StartHandler.handle("some_arg", key="value")
|
|
90
|
+
|
|
91
|
+
:param handler: Fallback handler class (or name) to transfer control
|
|
92
|
+
to when ``handoff_origin`` is ``None``.
|
|
93
|
+
:type handler: type[Handler] | str
|
|
94
|
+
|
|
95
|
+
:raises NameError: If a string name is provided but no registered
|
|
96
|
+
handler exists with that name.
|
|
97
|
+
:raises TypeError: If the provided value is not a ``Handler`` subclass.
|
|
98
|
+
|
|
99
|
+
.. seealso:: :meth:`handoff_back`, :meth:`handoff_back_or`
|
|
100
|
+
"""
|
|
101
|
+
if self.handoff_origin is None:
|
|
102
|
+
self.handoff(handler).handle(*args, **kwargs)
|
|
103
|
+
else:
|
|
104
|
+
self.handoff_back(*args, **kwargs)
|
|
105
|
+
|
|
65
106
|
def handoff_back_or(self, handler: type[telekit.Handler] | str) -> Callable[..., None]:
|
|
66
107
|
"""
|
|
67
108
|
Return a callable that transfers control back to the origin handler,
|
|
68
109
|
or falls back to ``handler`` if this handler was invoked directly.
|
|
69
110
|
|
|
70
111
|
Useful for ``« Back`` buttons in handlers that can be reached both
|
|
71
|
-
via :meth:`handoff` and directly
|
|
112
|
+
via :meth:`handoff` and directly::
|
|
72
113
|
|
|
73
|
-
.. code-block:: python
|
|
74
114
|
self.chain.set_inline_keyboard({
|
|
75
115
|
"« Back": self.handoff_back_or(StartHandler)
|
|
76
116
|
})
|
|
77
117
|
|
|
78
118
|
Any positional or keyword arguments passed to the returned callable
|
|
79
|
-
are forwarded to ``handle()`` of whichever handler is invoked
|
|
119
|
+
are forwarded to ``handle()`` of whichever handler is invoked::
|
|
80
120
|
|
|
81
|
-
.. code-block:: python
|
|
82
121
|
back = self.handoff_back_or(StartHandler)
|
|
83
122
|
back("some_arg", key="value")
|
|
84
123
|
# if handed off: handoff_origin.handle("some_arg", key="value")
|
|
85
124
|
# if direct: StartHandler.handle("some_arg", key="value")
|
|
86
125
|
|
|
87
|
-
:param handler: Fallback handler class (or name) to transfer control
|
|
88
|
-
|
|
89
|
-
:type handler:
|
|
90
|
-
|
|
91
|
-
:
|
|
126
|
+
:param handler: Fallback handler class (or name) to transfer control
|
|
127
|
+
to when ``handoff_origin`` is ``None``.
|
|
128
|
+
:type handler: type[Handler] | str
|
|
129
|
+
|
|
130
|
+
:return: A callable that performs the handoff; it accepts any
|
|
131
|
+
arguments and forwards them to ``handle()``.
|
|
132
|
+
:rtype: Callable[..., None]
|
|
133
|
+
|
|
134
|
+
.. seealso:: :meth:`handle_handoff_back_or` — a closure-free
|
|
135
|
+
alternative for use as a callback.
|
|
92
136
|
"""
|
|
93
|
-
|
|
94
|
-
if self.handoff_origin is None:
|
|
95
|
-
self.handoff(handler).handle(*args, **kwargs)
|
|
96
|
-
else:
|
|
97
|
-
self.handoff_back(*args, **kwargs)
|
|
98
|
-
|
|
99
|
-
return handoff_invoker
|
|
137
|
+
return partial(self.handle_handoff_back_or, handler)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: telekit
|
|
3
|
-
Version: 2.6.
|
|
3
|
+
Version: 2.6.0a4
|
|
4
4
|
Summary: Declarative, developer-friendly framework for building Telegram bots
|
|
5
5
|
Home-page: https://github.com/Romashkaa/telekit
|
|
6
6
|
Author: romashka
|
|
@@ -471,19 +471,30 @@ Telekit focuses on one job: making Telegram bot development easier.
|
|
|
471
471
|
|
|
472
472
|
---
|
|
473
473
|
|
|
474
|
-
# Changes in version 2.6.
|
|
474
|
+
# Changes in version 2.6.0a4
|
|
475
|
+
|
|
476
|
+
### v2.6.0 `a4`
|
|
477
|
+
- Added `handle_handoff()` to `Handler`: a shortcut for `handoff(handler).handle()` that takes the target handler as an argument, so it can be passed to `add_callback()` without an extra closure
|
|
478
|
+
- Added `handle_handoff_back_or()` to `TrackHandoffOrigin`: a closure-free counterpart of `handoff_back_or()`
|
|
479
|
+
- Reworked `handoff_back_or()` as a thin `functools.partial` wrapper around `handle_handoff_back_or()`
|
|
480
|
+
- Fixed the `handoff_back_or()` docstring: the returned callable forwards its arguments to `handle()` instead of being zero-argument
|
|
481
|
+
- Converted the `handoff()` docstring to reST
|
|
475
482
|
|
|
476
483
|
### v2.6.0 `a3`
|
|
477
|
-
- Added support for Rich HTML messages (Bot API 10.1+)
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
484
|
+
- Added support for Rich HTML messages (Bot API 10.1+)
|
|
485
|
+
- Added the `_rich.py` module for Rich HTML parsing and serialization
|
|
486
|
+
- Added new rich tags to `styles.py` for enhanced text formatting
|
|
487
|
+
- Added the `rich.py` example handler demonstrating Rich HTML: inline styles, blocks, lists, tables, media, and sender integration
|
|
481
488
|
|
|
482
489
|
### v2.6.0 `a2`
|
|
483
|
-
- Reworked `.env` and token/canvas file reading in `utils
|
|
490
|
+
- Reworked `.env` and token/canvas file reading in `utils`
|
|
491
|
+
- Added full `.env` syntax support: comments, `export`, quotes and escapes, multi-line values, `$VAR` interpolation
|
|
492
|
+
- Added the `cache` parameter (default `True`) and `clear_cache()`
|
|
493
|
+
- Added detailed errors with fix suggestions and creation commands, and new `Env*Error` exceptions
|
|
494
|
+
- Changed `load_env()` to raise `EnvFileNotFoundError` for a missing file instead of returning `{}`
|
|
484
495
|
|
|
485
496
|
### v2.6.0 `a1`
|
|
486
|
-
- Added a module-loading utility
|
|
497
|
+
- Added a module-loading utility to `utils`
|
|
487
498
|
|
|
488
499
|
### v2.6.0 `a0`
|
|
489
500
|
- Improved formatting in `_on.py`
|
|
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
|
|
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
|