Reformat code

This commit is contained in:
Nikita 2019-03-24 00:15:09 +05:00
parent d41d38d49f
commit 088116e1c7
12 changed files with 18 additions and 19 deletions

View file

@ -49,9 +49,9 @@ def get_keyboard() -> types.InlineKeyboardMarkup:
def format_post(post_id: str, post: dict) -> (str, types.InlineKeyboardMarkup):
text = f"{md.hbold(post['title'])}\n" \
f"{md.quote_html(post['body'])}\n" \
f"\n" \
f"Votes: {post['votes']}"
f"{md.quote_html(post['body'])}\n" \
f"\n" \
f"Votes: {post['votes']}"
markup = types.InlineKeyboardMarkup()
markup.row(

View file

@ -2,10 +2,9 @@ import asyncio
from aiogram import Bot
from aiogram import types
from aiogram.utils import executor
from aiogram.dispatcher import Dispatcher
from aiogram.types.message import ContentTypes
from aiogram.utils import executor
BOT_TOKEN = 'BOT TOKEN HERE'
PAYMENTS_PROVIDER_TOKEN = '123456789:TEST:1234567890abcdef1234567890abcdef'

View file

@ -76,7 +76,8 @@ async def unknown(message: types.Message):
"""
Handler for unknown messages.
"""
return SendMessage(message.chat.id, f"I don\'t know what to do with content type `{message.content_type()}`. Sorry :c")
return SendMessage(message.chat.id,
f"I don\'t know what to do with content type `{message.content_type()}`. Sorry :c")
async def cmd_id(message: types.Message):