mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Update type hints across the codebase (#1749)
* Update type hints across the codebase * Added changelog record
This commit is contained in:
parent
dcff0f99c7
commit
0306695b61
307 changed files with 6190 additions and 6385 deletions
|
|
@ -1,6 +1,6 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING, Any, Optional
|
||||
from typing import TYPE_CHECKING, Any
|
||||
|
||||
from ..types import MenuButtonUnion
|
||||
from .base import TelegramMethod
|
||||
|
|
@ -16,9 +16,9 @@ class SetChatMenuButton(TelegramMethod[bool]):
|
|||
__returning__ = bool
|
||||
__api_method__ = "setChatMenuButton"
|
||||
|
||||
chat_id: Optional[int] = None
|
||||
chat_id: int | None = None
|
||||
"""Unique identifier for the target private chat. If not specified, default bot's menu button will be changed"""
|
||||
menu_button: Optional[MenuButtonUnion] = None
|
||||
menu_button: MenuButtonUnion | None = None
|
||||
"""A JSON-serialized object for the bot's new menu button. Defaults to :class:`aiogram.types.menu_button_default.MenuButtonDefault`"""
|
||||
|
||||
if TYPE_CHECKING:
|
||||
|
|
@ -28,8 +28,8 @@ class SetChatMenuButton(TelegramMethod[bool]):
|
|||
def __init__(
|
||||
__pydantic__self__,
|
||||
*,
|
||||
chat_id: Optional[int] = None,
|
||||
menu_button: Optional[MenuButtonUnion] = None,
|
||||
chat_id: int | None = None,
|
||||
menu_button: MenuButtonUnion | None = None,
|
||||
**__pydantic_kwargs: Any,
|
||||
) -> None:
|
||||
# DO NOT EDIT MANUALLY!!!
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue