mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Add support for nullable fields in callback data
This update extends the callback data handling by adding support for nullable fields. The code now uses the Python typing structures `Optional` and `Union` to parse such fields correctly. A helper function `_check_field_is_nullable` has been added to assist in efficiently checking if a given field is nullable.
This commit is contained in:
parent
42599fa82a
commit
22f10a881c
2 changed files with 4 additions and 2 deletions
|
|
@ -14,9 +14,10 @@ from .utils.text_decorations import html_decoration as html
|
|||
from .utils.text_decorations import markdown_decoration as md
|
||||
|
||||
with suppress(ImportError):
|
||||
import uvloop as _uvloop
|
||||
import asyncio
|
||||
|
||||
import uvloop as _uvloop
|
||||
|
||||
asyncio.set_event_loop_policy(_uvloop.EventLoopPolicy())
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import pytest
|
||||
import sys
|
||||
|
||||
import pytest
|
||||
|
||||
from aiogram.fsm.state import State, StatesGroup, any_state
|
||||
|
||||
PY312_OR_GREATER = sys.version_info >= (3, 12)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue