mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Migrate to hatchling instead of poetry, ruff instead of flake8
This commit is contained in:
parent
04ccb390d5
commit
c62a450253
48 changed files with 452 additions and 2772 deletions
|
|
@ -5,7 +5,11 @@ from _pytest.config import UsageError
|
|||
from redis.asyncio.connection import parse_url as parse_redis_url
|
||||
|
||||
from aiogram import Bot, Dispatcher
|
||||
from aiogram.fsm.storage.memory import DisabledEventIsolation, MemoryStorage, SimpleEventIsolation
|
||||
from aiogram.fsm.storage.memory import (
|
||||
DisabledEventIsolation,
|
||||
MemoryStorage,
|
||||
SimpleEventIsolation,
|
||||
)
|
||||
from aiogram.fsm.storage.redis import RedisEventIsolation, RedisStorage
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,10 @@
|
|||
from aiogram import Bot
|
||||
from aiogram.methods import AnswerInlineQuery, Request
|
||||
from aiogram.types import InlineQueryResult, InlineQueryResultPhoto, InputTextMessageContent
|
||||
from aiogram.types import (
|
||||
InlineQueryResult,
|
||||
InlineQueryResultPhoto,
|
||||
InputTextMessageContent,
|
||||
)
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,11 @@
|
|||
from aiogram.methods import AnswerShippingQuery
|
||||
from aiogram.types import LabeledPrice, ShippingAddress, ShippingOption, ShippingQuery, User
|
||||
from aiogram.types import (
|
||||
LabeledPrice,
|
||||
ShippingAddress,
|
||||
ShippingOption,
|
||||
ShippingQuery,
|
||||
User,
|
||||
)
|
||||
|
||||
|
||||
class TestInlineQuery:
|
||||
|
|
|
|||
|
|
@ -5,7 +5,15 @@ from typing import Sequence, Type
|
|||
import pytest
|
||||
|
||||
from aiogram.filters import Text
|
||||
from aiogram.types import CallbackQuery, Chat, InlineQuery, Message, Poll, PollOption, User
|
||||
from aiogram.types import (
|
||||
CallbackQuery,
|
||||
Chat,
|
||||
InlineQuery,
|
||||
Message,
|
||||
Poll,
|
||||
PollOption,
|
||||
User,
|
||||
)
|
||||
|
||||
|
||||
class TestText:
|
||||
|
|
|
|||
|
|
@ -1,7 +1,11 @@
|
|||
import pytest
|
||||
|
||||
from aiogram.fsm.storage.base import DEFAULT_DESTINY, StorageKey
|
||||
from aiogram.fsm.storage.redis import DefaultKeyBuilder, RedisEventIsolation, RedisStorage
|
||||
from aiogram.fsm.storage.redis import (
|
||||
DefaultKeyBuilder,
|
||||
RedisEventIsolation,
|
||||
RedisStorage,
|
||||
)
|
||||
|
||||
PREFIX = "test"
|
||||
BOT_ID = 42
|
||||
|
|
|
|||
|
|
@ -7,7 +7,12 @@ from aiogram.fsm.context import FSMContext
|
|||
from aiogram.fsm.storage.base import StorageKey
|
||||
from aiogram.fsm.storage.memory import MemoryStorage
|
||||
from aiogram.types import Update, User
|
||||
from aiogram.utils.i18n import ConstI18nMiddleware, FSMI18nMiddleware, I18n, SimpleI18nMiddleware
|
||||
from aiogram.utils.i18n import (
|
||||
ConstI18nMiddleware,
|
||||
FSMI18nMiddleware,
|
||||
I18n,
|
||||
SimpleI18nMiddleware,
|
||||
)
|
||||
from aiogram.utils.i18n.context import get_i18n, gettext, lazy_gettext
|
||||
from tests.conftest import DATA_DIR
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
|
|
|||
|
|
@ -7,7 +7,11 @@ from aiogram.types import (
|
|||
KeyboardButton,
|
||||
ReplyKeyboardMarkup,
|
||||
)
|
||||
from aiogram.utils.keyboard import InlineKeyboardBuilder, KeyboardBuilder, ReplyKeyboardBuilder
|
||||
from aiogram.utils.keyboard import (
|
||||
InlineKeyboardBuilder,
|
||||
KeyboardBuilder,
|
||||
ReplyKeyboardBuilder,
|
||||
)
|
||||
|
||||
|
||||
class MyCallback(CallbackData, prefix="test"):
|
||||
|
|
|
|||
|
|
@ -3,7 +3,11 @@ from typing import List, Optional
|
|||
import pytest
|
||||
|
||||
from aiogram.types import MessageEntity, User
|
||||
from aiogram.utils.text_decorations import TextDecoration, html_decoration, markdown_decoration
|
||||
from aiogram.utils.text_decorations import (
|
||||
TextDecoration,
|
||||
html_decoration,
|
||||
markdown_decoration,
|
||||
)
|
||||
|
||||
|
||||
class TestTextDecoration:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue