mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-12 10:11:52 +00:00
Updated pre-commit hook (#681)
* Updated pre-commit config and reformat code * Added changelog
This commit is contained in:
parent
90b3a99039
commit
e356ede5de
20 changed files with 74 additions and 62 deletions
|
|
@ -7,9 +7,9 @@ from aiogram import Bot, Dispatcher, F
|
|||
from aiogram.dispatcher.filters import Command
|
||||
from aiogram.dispatcher.fsm.context import FSMContext
|
||||
from aiogram.dispatcher.fsm.state import State, StatesGroup
|
||||
from aiogram.types import Message, ReplyKeyboardRemove, ReplyKeyboardMarkup, KeyboardButton
|
||||
from aiogram.types import KeyboardButton, Message, ReplyKeyboardMarkup, ReplyKeyboardRemove
|
||||
from aiogram.utils.keyboard import KeyboardBuilder
|
||||
from aiogram.utils.markdown import hbold
|
||||
from aiogram.utils.markup import KeyboardConstructor
|
||||
|
||||
GENDERS = ["Male", "Female", "Helicopter", "Other"]
|
||||
|
||||
|
|
@ -76,7 +76,7 @@ async def process_age(message: Message, state: FSMContext):
|
|||
await state.update_data(age=int(message.text))
|
||||
|
||||
# Configure ReplyKeyboardMarkup
|
||||
constructor = KeyboardConstructor(KeyboardButton)
|
||||
constructor = KeyboardBuilder(KeyboardButton)
|
||||
constructor.add(*(KeyboardButton(text=text) for text in GENDERS)).adjust(2)
|
||||
markup = ReplyKeyboardMarkup(
|
||||
resize_keyboard=True, selective=True, keyboard=constructor.export()
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
from aiogram.types.inline_keyboard_button import InlineKeyboardButton
|
||||
from aiogram.types.inline_keyboard_markup import InlineKeyboardMarkup
|
||||
from aiogram.dispatcher.router import Router
|
||||
from aiogram.utils.handlers_in_use import get_handlers_in_use
|
||||
import logging
|
||||
|
||||
from aiogram import Bot, Dispatcher
|
||||
from aiogram.types import Message, ChatMemberUpdated, CallbackQuery
|
||||
from aiogram.dispatcher.router import Router
|
||||
from aiogram.types import CallbackQuery, ChatMemberUpdated, Message
|
||||
from aiogram.types.inline_keyboard_button import InlineKeyboardButton
|
||||
from aiogram.types.inline_keyboard_markup import InlineKeyboardMarkup
|
||||
from aiogram.utils.handlers_in_use import get_handlers_in_use
|
||||
|
||||
TOKEN = "6wo"
|
||||
dp = Dispatcher()
|
||||
|
|
@ -51,7 +51,7 @@ sub_sub_router = Router()
|
|||
|
||||
|
||||
@sub_sub_router.edited_message()
|
||||
async def callback_tap_me(edited_message: Message) -> None:
|
||||
async def edited_message_handler(edited_message: Message) -> None:
|
||||
await edited_message.reply("Message was edited, big brother watch you")
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue