mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Refactor with black & isort
This commit is contained in:
parent
43c3101797
commit
ac5473381f
2 changed files with 14 additions and 11 deletions
|
|
@ -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),
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue