mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
* #1579 Fixed `Default` object annotation resolution in `pydantic` models. Reformat code. * Bump mongo and Redis dependencies * Update pydantic version constraints based on Python version Adjusted the version constraints for the pydantic library in `pyproject.toml` to ensure compatibility with different Python versions. This helps maintain stability and compatibility across various development environments. * Adjust version * Fixed typo
This commit is contained in:
parent
b7d61b6379
commit
f9f847f603
5 changed files with 12 additions and 7 deletions
|
|
@ -162,6 +162,7 @@ from .paid_media import PaidMedia
|
|||
from .paid_media_info import PaidMediaInfo
|
||||
from .paid_media_photo import PaidMediaPhoto
|
||||
from .paid_media_preview import PaidMediaPreview
|
||||
from .paid_media_purchased import PaidMediaPurchased
|
||||
from .paid_media_video import PaidMediaVideo
|
||||
from .passport_data import PassportData
|
||||
from .passport_element_error import PassportElementError
|
||||
|
|
@ -233,7 +234,6 @@ from .web_app_data import WebAppData
|
|||
from .web_app_info import WebAppInfo
|
||||
from .webhook_info import WebhookInfo
|
||||
from .write_access_allowed import WriteAccessAllowed
|
||||
from .paid_media_purchased import PaidMediaPurchased
|
||||
|
||||
__all__ = (
|
||||
"Animation",
|
||||
|
|
@ -473,6 +473,8 @@ __all__ = (
|
|||
"WriteAccessAllowed",
|
||||
)
|
||||
|
||||
from ..client.default import Default as _Default
|
||||
|
||||
# Load typing forward refs for every TelegramObject
|
||||
for _entity_name in __all__:
|
||||
_entity = globals()[_entity_name]
|
||||
|
|
@ -484,6 +486,7 @@ for _entity_name in __all__:
|
|||
"Optional": Optional,
|
||||
"Union": Union,
|
||||
"Literal": Literal,
|
||||
"Default": _Default,
|
||||
**{k: v for k, v in globals().items() if k in __all__},
|
||||
}
|
||||
)
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ from __future__ import annotations
|
|||
|
||||
from typing import TYPE_CHECKING, Any, Optional, cast
|
||||
|
||||
from .base import TelegramObject
|
||||
from ..utils.mypy_hacks import lru_cache
|
||||
from .base import TelegramObject
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from .business_connection import BusinessConnection
|
||||
|
|
@ -18,11 +18,11 @@ if TYPE_CHECKING:
|
|||
from .message import Message
|
||||
from .message_reaction_count_updated import MessageReactionCountUpdated
|
||||
from .message_reaction_updated import MessageReactionUpdated
|
||||
from .paid_media_purchased import PaidMediaPurchased
|
||||
from .poll import Poll
|
||||
from .poll_answer import PollAnswer
|
||||
from .pre_checkout_query import PreCheckoutQuery
|
||||
from .shipping_query import ShippingQuery
|
||||
from .paid_media_purchased import PaidMediaPurchased
|
||||
|
||||
|
||||
class Update(TelegramObject):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue