mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
fixed ruff issues (#1549)
This commit is contained in:
parent
2516f32168
commit
98c2a4fb57
3 changed files with 5 additions and 3 deletions
|
|
@ -171,7 +171,7 @@ class Text(Iterable[NodeType]):
|
||||||
def __add__(self, other: NodeType) -> "Text":
|
def __add__(self, other: NodeType) -> "Text":
|
||||||
if isinstance(other, Text) and other.type == self.type and self._params == other._params:
|
if isinstance(other, Text) and other.type == self.type and self._params == other._params:
|
||||||
return type(self)(*self, *other, **self._params)
|
return type(self)(*self, *other, **self._params)
|
||||||
if type(self) == Text and isinstance(other, str):
|
if type(self) is Text and isinstance(other, str):
|
||||||
return type(self)(*self, other, **self._params)
|
return type(self)(*self, other, **self._params)
|
||||||
return Text(self, other)
|
return Text(self, other)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@ from os import getenv
|
||||||
from typing import Any, Dict, Union
|
from typing import Any, Dict, Union
|
||||||
|
|
||||||
from aiohttp import web
|
from aiohttp import web
|
||||||
from finite_state_machine import form_router
|
|
||||||
|
|
||||||
from aiogram import Bot, Dispatcher, F, Router
|
from aiogram import Bot, Dispatcher, F, Router
|
||||||
from aiogram.client.session.aiohttp import AiohttpSession
|
from aiogram.client.session.aiohttp import AiohttpSession
|
||||||
|
|
@ -19,6 +18,7 @@ from aiogram.webhook.aiohttp_server import (
|
||||||
TokenBasedRequestHandler,
|
TokenBasedRequestHandler,
|
||||||
setup_application,
|
setup_application,
|
||||||
)
|
)
|
||||||
|
from finite_state_machine import form_router
|
||||||
|
|
||||||
main_router = Router()
|
main_router = Router()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,9 @@ async def send_message_handler(request: Request):
|
||||||
[
|
[
|
||||||
InlineKeyboardButton(
|
InlineKeyboardButton(
|
||||||
text="Open",
|
text="Open",
|
||||||
web_app=WebAppInfo(url=str(request.url.with_scheme("https").with_path("demo"))),
|
web_app=WebAppInfo(
|
||||||
|
url=str(request.url.with_scheme("https").with_path("demo"))
|
||||||
|
),
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue