Removed unreachable code

This commit is contained in:
Alex Root Junior 2022-04-19 21:25:43 +03:00
parent f03a738af8
commit a869c54ecc
No known key found for this signature in database
GPG key ID: 074C1D455EBEA4AC
9 changed files with 5 additions and 41 deletions

View file

@ -1,14 +1,12 @@
from typing import TYPE_CHECKING, Any, Dict, Optional, Sequence, Union
from typing import Any, Dict, Optional, Sequence, Union
from pydantic import root_validator
from aiogram.dispatcher.filters import BaseFilter
from aiogram.types import CallbackQuery, InlineQuery, Message, Poll
from aiogram.utils.i18n.lazy_proxy import LazyProxy
if TYPE_CHECKING:
from aiogram.utils.i18n.lazy_proxy import LazyProxy
TextType = Union[str, "LazyProxy"]
TextType = Union[str, LazyProxy]
class Text(BaseFilter):

View file

@ -1,14 +1,9 @@
from __future__ import annotations
from typing import TYPE_CHECKING
from pydantic import Field
from . import MenuButton
if TYPE_CHECKING:
pass
class MenuButtonCommands(MenuButton):
"""

View file

@ -1,14 +1,9 @@
from __future__ import annotations
from typing import TYPE_CHECKING
from pydantic import Field
from . import MenuButton
if TYPE_CHECKING:
pass
class MenuButtonDefault(MenuButton):
"""

View file

@ -72,7 +72,7 @@ if TYPE_CHECKING:
from .web_app_data import WebAppData
class _BaseMessage(TelegramObject):
class Message(TelegramObject):
"""
This object represents a message.
@ -198,8 +198,6 @@ class _BaseMessage(TelegramObject):
reply_markup: Optional[InlineKeyboardMarkup] = None
"""*Optional*. Inline keyboard attached to the message. :code:`login_url` buttons are represented as ordinary :code:`url` buttons."""
class Message(_BaseMessage):
@property
def content_type(self) -> str:
if self.text:

View file

@ -1,12 +1,9 @@
from __future__ import annotations
from typing import TYPE_CHECKING, Optional
from typing import Optional
from .base import TelegramObject
if TYPE_CHECKING:
pass
class SentWebAppMessage(TelegramObject):
"""

View file

@ -1,13 +1,9 @@
from __future__ import annotations
from datetime import datetime
from typing import TYPE_CHECKING
from .base import TelegramObject
if TYPE_CHECKING:
pass
class VideoChatScheduled(TelegramObject):
"""

View file

@ -1,12 +1,7 @@
from __future__ import annotations
from typing import TYPE_CHECKING
from .base import TelegramObject
if TYPE_CHECKING:
pass
class VideoChatStarted(TelegramObject):
"""

View file

@ -1,12 +1,7 @@
from __future__ import annotations
from typing import TYPE_CHECKING
from .base import TelegramObject
if TYPE_CHECKING:
pass
class WebAppData(TelegramObject):
"""

View file

@ -1,12 +1,7 @@
from __future__ import annotations
from typing import TYPE_CHECKING
from .base import TelegramObject
if TYPE_CHECKING:
pass
class WebAppInfo(TelegramObject):
"""