mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Update pydantic to V2 (#1202)
* Update pydantic, fix errors and warnings (all?) * Fixed typehints * Reformat code, removed unused imports * Fixed typing extensions version compatibility * Fixed coverage * Describe changes * Regen code
This commit is contained in:
parent
066d16b522
commit
461e59bbdd
182 changed files with 385 additions and 485 deletions
|
|
@ -1,6 +1,6 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING, List, Optional
|
||||
from typing import List, Optional
|
||||
|
||||
from pydantic import Field
|
||||
|
||||
|
|
@ -32,12 +32,12 @@ class AnswerInlineQuery(TelegramMethod[bool]):
|
|||
"""Pass the offset that a client should send in the next query with the same text to receive more results. Pass an empty string if there are no more results or if you don't support pagination. Offset length can't exceed 64 bytes."""
|
||||
button: Optional[InlineQueryResultsButton] = None
|
||||
"""A JSON-serialized object describing a button to be shown above inline query results"""
|
||||
switch_pm_parameter: Optional[str] = Field(None, deprecated=True)
|
||||
switch_pm_parameter: Optional[str] = Field(None, json_schema_extra={"deprecated": True})
|
||||
"""`Deep-linking <https://core.telegram.org/bots/features#deep-linking>`_ parameter for the /start message sent to the bot when user presses the switch button. 1-64 characters, only :code:`A-Z`, :code:`a-z`, :code:`0-9`, :code:`_` and :code:`-` are allowed.
|
||||
|
||||
.. deprecated:: API:6.7
|
||||
https://core.telegram.org/bots/api-changelog#april-21-2023"""
|
||||
switch_pm_text: Optional[str] = Field(None, deprecated=True)
|
||||
switch_pm_text: Optional[str] = Field(None, json_schema_extra={"deprecated": True})
|
||||
"""If passed, clients will display a button with specified text that switches the user to a private chat with the bot and sends the bot a start message with the parameter *switch_pm_parameter*
|
||||
|
||||
.. deprecated:: API:6.7
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue