Updated pre-commit hook (#681)

* Updated pre-commit config and reformat code

* Added changelog
This commit is contained in:
Alex Root Junior 2021-09-07 00:32:43 +03:00 committed by GitHub
parent 90b3a99039
commit e356ede5de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 74 additions and 62 deletions

View file

@ -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()