Refactor with black & isort

This commit is contained in:
welaskez 2025-03-06 12:36:24 +05:00
parent 43c3101797
commit ac5473381f
2 changed files with 14 additions and 11 deletions

View file

@ -85,17 +85,17 @@ async def create_startapp_link(
encoder: Optional[Callable[[bytes], bytes]] = None,
) -> str:
"""
Create 'startapp' deep link with your payload.
Create 'startapp' deep link with your payload.
If you need to encode payload or pass special characters -
set encode as True
If you need to encode payload or pass special characters -
set encode as True
:param bot: bot instance
:param payload: args passed with /start
:param encode: encode payload with base64url or custom encoder
:param encoder: custom encoder callable
:return: link
"""
:param bot: bot instance
:param payload: args passed with /start
:param encode: encode payload with base64url or custom encoder
:param encoder: custom encoder callable
:return: link
"""
username = (await bot.me()).username
return create_deep_link(
username=cast(str, username),

View file

@ -1,7 +1,10 @@
import pytest
from aiogram.utils.deep_linking import create_start_link, create_startgroup_link, \
create_startapp_link
from aiogram.utils.deep_linking import (
create_start_link,
create_startapp_link,
create_startgroup_link,
)
from aiogram.utils.payload import decode_payload, encode_payload
from tests.mocked_bot import MockedBot