Relative imports and reformat code (auto)

This commit is contained in:
Alex Root Junior 2017-12-10 02:40:59 +02:00
parent 6a64573e44
commit 0295aed615
8 changed files with 19 additions and 6 deletions

View file

@ -211,7 +211,7 @@ class ChatActions(helper.Helper):
@classmethod
async def _do(cls, action: str, sleep=None):
from aiogram.dispatcher.ctx import get_bot, get_chat
from ..dispatcher.ctx import get_bot, get_chat
await get_bot().send_chat_action(get_chat(), action)
if sleep:
await asyncio.sleep(sleep)

View file

@ -1,9 +1,9 @@
import datetime
from aiogram.utils import helper
from . import base
from . import fields
from .user import User
from ..utils import helper
class ChatMember(base.TelegramObject):

View file

@ -76,6 +76,7 @@ class MediaGroup(base.TelegramObject):
"""
Helper for sending media group
"""
def __init__(self, medias: typing.Optional[typing.List[typing.Union[InputMedia, typing.Dict]]] = None):
super(MediaGroup, self).__init__()
self.media = []

View file

@ -31,4 +31,4 @@ class PreCheckoutQuery(base.TelegramObject):
def __eq__(self, other):
if isinstance(other, type(self)):
return other.id == self.id
return self.id == other
return self.id == other