Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pre-commit.ci] pre-commit autoupdate #3824

Merged
merged 4 commits into from Aug 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Expand Up @@ -6,14 +6,14 @@ ci:

repos:
- repo: https://github.com/psf/black
rev: 23.3.0
rev: 23.7.0
hooks:
- id: black
args:
- --diff
- --check
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
rev: 6.1.0
hooks:
- id: flake8
- repo: https://github.com/PyCQA/pylint
Expand Down Expand Up @@ -62,7 +62,7 @@ repos:
- cachetools~=5.3.1
- . # this basically does `pip install -e .`
- repo: https://github.com/asottile/pyupgrade
rev: v3.8.0
rev: v3.10.1
hooks:
- id: pyupgrade
files: ^(telegram|examples|tests|docs)/.*\.py$
Expand All @@ -77,7 +77,7 @@ repos:
- --diff
- --check
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.0.277'
rev: 'v0.0.281'
hooks:
- id: ruff
name: ruff
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Expand Up @@ -12,7 +12,7 @@ target-version = "py38"
show-fixes = true
ignore = ["PLR2004", "PLR0911", "PLR0912", "PLR0913", "PLR0915", "PERF203"]
select = ["E", "F", "I", "PL", "UP", "RUF", "PTH", "C4", "B", "PIE", "SIM", "RET", "RSE",
"G", "ISC", "PT", "ASYNC", "TCH", "CPY", "SLOT", "PERF",]
"G", "ISC", "PT", "ASYNC", "TCH", "CPY", "SLOT", "PERF", "PYI"]

[tool.ruff.per-file-ignores]
"tests/*.py" = ["B018"]
Expand Down
2 changes: 1 addition & 1 deletion telegram/_bot.py
Expand Up @@ -2746,7 +2746,7 @@ def _effective_inline_results( # skipcq: PYL-R0201
if callable(results):
callable_output = results(current_offset_int)
if not callable_output:
effective_results: Sequence["InlineQueryResult"] = []
effective_results: Sequence[InlineQueryResult] = []
else:
effective_results = callable_output
# the callback *might* return more results on the next call, so we increment
Expand Down
2 changes: 1 addition & 1 deletion telegram/_botcommandscope.py
Expand Up @@ -100,7 +100,7 @@ def de_json(cls, data: Optional[JSONDict], bot: "Bot") -> Optional["BotCommandSc
if not data:
return None

_class_mapping: Dict[str, Type["BotCommandScope"]] = {
_class_mapping: Dict[str, Type[BotCommandScope]] = {
cls.DEFAULT: BotCommandScopeDefault,
cls.ALL_PRIVATE_CHATS: BotCommandScopeAllPrivateChats,
cls.ALL_GROUP_CHATS: BotCommandScopeAllGroupChats,
Expand Down
2 changes: 1 addition & 1 deletion telegram/_chatmember.py
Expand Up @@ -111,7 +111,7 @@ def de_json(cls, data: Optional[JSONDict], bot: "Bot") -> Optional["ChatMember"]
if not data:
return None

_class_mapping: Dict[str, Type["ChatMember"]] = {
_class_mapping: Dict[str, Type[ChatMember]] = {
cls.OWNER: ChatMemberOwner,
cls.ADMINISTRATOR: ChatMemberAdministrator,
cls.MEMBER: ChatMemberMember,
Expand Down
2 changes: 1 addition & 1 deletion telegram/_files/file.py
Expand Up @@ -99,7 +99,7 @@ def __init__(
self.file_size: Optional[int] = file_size
self.file_path: Optional[str] = file_path

self._credentials: Optional["FileCredentials"] = None
self._credentials: Optional[FileCredentials] = None

self._id_attrs = (self.file_unique_id,)

Expand Down
2 changes: 1 addition & 1 deletion telegram/_menubutton.py
Expand Up @@ -85,7 +85,7 @@ def de_json(cls, data: Optional[JSONDict], bot: "Bot") -> Optional["MenuButton"]
if not data and cls is MenuButton:
return None

_class_mapping: Dict[str, Type["MenuButton"]] = {
_class_mapping: Dict[str, Type[MenuButton]] = {
cls.COMMANDS: MenuButtonCommands,
cls.WEB_APP: MenuButtonWebApp,
cls.DEFAULT: MenuButtonDefault,
Expand Down
4 changes: 2 additions & 2 deletions telegram/_message.py
Expand Up @@ -766,8 +766,8 @@ def __init__(
self.edit_date: Optional[datetime.datetime] = edit_date
self.has_protected_content: Optional[bool] = has_protected_content
self.text: Optional[str] = text
self.entities: Tuple["MessageEntity", ...] = parse_sequence_arg(entities)
self.caption_entities: Tuple["MessageEntity", ...] = parse_sequence_arg(caption_entities)
self.entities: Tuple[MessageEntity, ...] = parse_sequence_arg(entities)
self.caption_entities: Tuple[MessageEntity, ...] = parse_sequence_arg(caption_entities)
self.audio: Optional[Audio] = audio
self.game: Optional[Game] = game
self.document: Optional[Document] = document
Expand Down
6 changes: 3 additions & 3 deletions telegram/_passport/credentials.py
Expand Up @@ -154,7 +154,7 @@ def __init__(
self._id_attrs = (self.data, self.hash, self.secret)

self._decrypted_secret: Optional[str] = None
self._decrypted_data: Optional["Credentials"] = None
self._decrypted_data: Optional[Credentials] = None

self._freeze()

Expand Down Expand Up @@ -442,8 +442,8 @@ def __init__(
self.front_side: Optional[FileCredentials] = front_side
self.reverse_side: Optional[FileCredentials] = reverse_side
self.selfie: Optional[FileCredentials] = selfie
self.files: Tuple["FileCredentials", ...] = parse_sequence_arg(files)
self.translation: Tuple["FileCredentials", ...] = parse_sequence_arg(translation)
self.files: Tuple[FileCredentials, ...] = parse_sequence_arg(files)
self.translation: Tuple[FileCredentials, ...] = parse_sequence_arg(translation)

self._freeze()

Expand Down
2 changes: 1 addition & 1 deletion telegram/_payment/shippingoption.py
Expand Up @@ -68,7 +68,7 @@ def __init__(

self.id: str = id # pylint: disable=invalid-name
self.title: str = title
self.prices: Tuple["LabeledPrice", ...] = parse_sequence_arg(prices)
self.prices: Tuple[LabeledPrice, ...] = parse_sequence_arg(prices)

self._id_attrs = (self.id,)

Expand Down
2 changes: 1 addition & 1 deletion telegram/_telegramobject.py
Expand Up @@ -106,7 +106,7 @@ def __init__(self, *, api_kwargs: Optional[JSONDict] = None) -> None:
# classes than classes with arguments.
self._frozen: bool = False
self._id_attrs: Tuple[object, ...] = ()
self._bot: Optional["Bot"] = None
self._bot: Optional[Bot] = None
# We don't do anything with api_kwargs here - see docstring of _apply_api_kwargs
self.api_kwargs: Mapping[str, Any] = MappingProxyType(api_kwargs or {})

Expand Down
4 changes: 2 additions & 2 deletions telegram/_update.py
Expand Up @@ -271,8 +271,8 @@ def __init__(
self.chat_member: Optional[ChatMemberUpdated] = chat_member
self.chat_join_request: Optional[ChatJoinRequest] = chat_join_request

self._effective_user: Optional["User"] = None
self._effective_chat: Optional["Chat"] = None
self._effective_user: Optional[User] = None
self._effective_chat: Optional[Chat] = None
self._effective_message: Optional[Message] = None

self._id_attrs = (self.update_id,)
Expand Down
12 changes: 6 additions & 6 deletions telegram/ext/_application.py
Expand Up @@ -294,21 +294,21 @@ def __init__(
)

self.bot: BT = bot
self.update_queue: "asyncio.Queue[object]" = update_queue
self.update_queue: asyncio.Queue[object] = update_queue
self.context_types: ContextTypes[CCT, UD, CD, BD] = context_types
self.updater: Optional[Updater] = updater
self.handlers: Dict[int, List[BaseHandler[Any, CCT]]] = {}
self.error_handlers: Dict[
HandlerCallback[object, CCT, None], Union[bool, DefaultValue[bool]]
] = {}
self.post_init: Optional[
Callable[["Application[BT, CCT, UD, CD, BD, JQ]"], Coroutine[Any, Any, None]]
Callable[[Application[BT, CCT, UD, CD, BD, JQ]], Coroutine[Any, Any, None]]
] = post_init
self.post_shutdown: Optional[
Callable[["Application[BT, CCT, UD, CD, BD, JQ]"], Coroutine[Any, Any, None]]
Callable[[Application[BT, CCT, UD, CD, BD, JQ]], Coroutine[Any, Any, None]]
] = post_shutdown
self.post_stop: Optional[
Callable[["Application[BT, CCT, UD, CD, BD, JQ]"], Coroutine[Any, Any, None]]
Callable[[Application[BT, CCT, UD, CD, BD, JQ]], Coroutine[Any, Any, None]]
] = post_stop
self._update_processor = update_processor
self.bot_data: BD = self.context_types.bot_data()
Expand Down Expand Up @@ -1012,7 +1012,7 @@ def __create_task(
# but by passing `is_error_handler=True` from `process_error`, we can make sure that we
# get at most one recursion of the user calls `create_task` manually with an error handler
# function
task: "asyncio.Task[RT]" = asyncio.create_task(
task: asyncio.Task[RT] = asyncio.create_task(
self.__create_task_callback(
coroutine=coroutine, update=update, is_error_handler=is_error_handler
),
Expand Down Expand Up @@ -1671,7 +1671,7 @@ async def process_error(
update: Optional[object],
error: Exception,
job: Optional["Job[CCT]"] = None,
coroutine: _ErrorCoroType[RT] = None, # noqa: RUF013
coroutine: _ErrorCoroType[RT] = None,
) -> bool:
"""Processes an error by passing it to all error handlers registered with
:meth:`add_error_handler`. If one of the error handlers raises
Expand Down
14 changes: 7 additions & 7 deletions telegram/ext/_applicationbuilder.py
Expand Up @@ -171,42 +171,42 @@ def __init__(self: "InitApplicationBuilder"):
self._read_timeout: ODVInput[float] = DEFAULT_NONE
self._write_timeout: ODVInput[float] = DEFAULT_NONE
self._pool_timeout: ODVInput[float] = DEFAULT_NONE
self._request: DVInput["BaseRequest"] = DEFAULT_NONE
self._request: DVInput[BaseRequest] = DEFAULT_NONE
self._get_updates_connection_pool_size: DVInput[int] = DEFAULT_NONE
self._get_updates_proxy_url: DVInput[str] = DEFAULT_NONE
self._get_updates_connect_timeout: ODVInput[float] = DEFAULT_NONE
self._get_updates_read_timeout: ODVInput[float] = DEFAULT_NONE
self._get_updates_write_timeout: ODVInput[float] = DEFAULT_NONE
self._get_updates_pool_timeout: ODVInput[float] = DEFAULT_NONE
self._get_updates_request: DVInput["BaseRequest"] = DEFAULT_NONE
self._get_updates_request: DVInput[BaseRequest] = DEFAULT_NONE
self._get_updates_http_version: DVInput[str] = DefaultValue("1.1")
self._private_key: ODVInput[bytes] = DEFAULT_NONE
self._private_key_password: ODVInput[bytes] = DEFAULT_NONE
self._defaults: ODVInput["Defaults"] = DEFAULT_NONE
self._defaults: ODVInput[Defaults] = DEFAULT_NONE
self._arbitrary_callback_data: Union[DefaultValue[bool], int] = DEFAULT_FALSE
self._local_mode: DVType[bool] = DEFAULT_FALSE
self._bot: DVInput[Bot] = DEFAULT_NONE
self._update_queue: DVType[Queue] = DefaultValue(Queue())

try:
self._job_queue: ODVInput["JobQueue"] = DefaultValue(JobQueue())
self._job_queue: ODVInput[JobQueue] = DefaultValue(JobQueue())
except RuntimeError as exc:
if "PTB must be installed via" not in str(exc):
raise exc
self._job_queue = DEFAULT_NONE

self._persistence: ODVInput["BasePersistence"] = DEFAULT_NONE
self._persistence: ODVInput[BasePersistence] = DEFAULT_NONE
self._context_types: DVType[ContextTypes] = DefaultValue(ContextTypes())
self._application_class: DVType[Type[Application]] = DefaultValue(Application)
self._application_kwargs: Dict[str, object] = {}
self._update_processor: "BaseUpdateProcessor" = SimpleUpdateProcessor(
self._update_processor: BaseUpdateProcessor = SimpleUpdateProcessor(
max_concurrent_updates=1
)
self._updater: ODVInput[Updater] = DEFAULT_NONE
self._post_init: Optional[Callable[[Application], Coroutine[Any, Any, None]]] = None
self._post_shutdown: Optional[Callable[[Application], Coroutine[Any, Any, None]]] = None
self._post_stop: Optional[Callable[[Application], Coroutine[Any, Any, None]]] = None
self._rate_limiter: ODVInput["BaseRateLimiter"] = DEFAULT_NONE
self._rate_limiter: ODVInput[BaseRateLimiter] = DEFAULT_NONE
self._http_version: DVInput[str] = DefaultValue("1.1")

def _build_request(self, get_updates: bool) -> BaseRequest:
Expand Down
4 changes: 2 additions & 2 deletions telegram/ext/_callbackcontext.py
Expand Up @@ -144,9 +144,9 @@ def __init__(
self.args: Optional[List[str]] = None
self.matches: Optional[List[Match[str]]] = None
self.error: Optional[Exception] = None
self.job: Optional["Job[CCT]"] = None
self.job: Optional[Job[CCT]] = None
self.coroutine: Optional[
Union[Generator[Optional["Future[object]"], None, Any], Awaitable[Any]]
Union[Generator[Optional[Future[object]], None, Any], Awaitable[Any]]
] = None

@property
Expand Down
4 changes: 2 additions & 2 deletions telegram/ext/_conversationhandler.py
Expand Up @@ -339,10 +339,10 @@ def __init__(

# if conversation_timeout is used, this dict is used to schedule a job which runs when the
# conv has timed out.
self.timeout_jobs: Dict[ConversationKey, "Job[Any]"] = {}
self.timeout_jobs: Dict[ConversationKey, Job[Any]] = {}
self._timeout_jobs_lock = asyncio.Lock()
self._conversations: ConversationDict = {}
self._child_conversations: Set["ConversationHandler"] = set()
self._child_conversations: Set[ConversationHandler] = set()

if persistent and not self.name:
raise ValueError("Conversations can't be persistent when handler is unnamed.")
Expand Down
2 changes: 1 addition & 1 deletion telegram/ext/_jobqueue.py
Expand Up @@ -91,7 +91,7 @@ def __init__(self) -> None:
'"python-telegram-bot[job-queue]"`.'
)

self._application: "Optional[weakref.ReferenceType[Application]]" = None
self._application: Optional[weakref.ReferenceType[Application]] = None
self._executor = AsyncIOExecutor()
self.scheduler: AsyncIOScheduler = AsyncIOScheduler(
timezone=pytz.utc, executors={"default": self._executor}
Expand Down
2 changes: 1 addition & 1 deletion telegram/ext/_updater.py
Expand Up @@ -113,7 +113,7 @@ def __init__(
update_queue: "asyncio.Queue[object]",
):
self.bot: Bot = bot
self.update_queue: "asyncio.Queue[object]" = update_queue
self.update_queue: asyncio.Queue[object] = update_queue

self._last_update_id = 0
self._running = False
Expand Down
2 changes: 1 addition & 1 deletion tests/_files/test_animation.py
Expand Up @@ -156,7 +156,7 @@ def test_equality(self):

async def test_send_animation_custom_filename(self, bot, chat_id, animation_file, monkeypatch):
async def make_assertion(url, request_data: RequestData, *args, **kwargs):
return list(request_data.multipart_data.values())[0][0] == "custom_filename"
return next(iter(request_data.multipart_data.values()))[0] == "custom_filename"

monkeypatch.setattr(bot.request, "post", make_assertion)
assert await bot.send_animation(chat_id, animation_file, filename="custom_filename")
Expand Down
2 changes: 1 addition & 1 deletion tests/_files/test_audio.py
Expand Up @@ -176,7 +176,7 @@ async def make_assertion(url, request_data: RequestData, *args, **kwargs):

async def test_send_audio_custom_filename(self, bot, chat_id, audio_file, monkeypatch):
async def make_assertion(url, request_data: RequestData, *args, **kwargs):
return list(request_data.multipart_data.values())[0][0] == "custom_filename"
return next(iter(request_data.multipart_data.values()))[0] == "custom_filename"

monkeypatch.setattr(bot.request, "post", make_assertion)
assert await bot.send_audio(chat_id, audio_file, filename="custom_filename")
Expand Down
2 changes: 1 addition & 1 deletion tests/_files/test_photo.py
Expand Up @@ -162,7 +162,7 @@ async def test_error_without_required_args(self, bot, chat_id):

async def test_send_photo_custom_filename(self, bot, chat_id, photo_file, monkeypatch):
async def make_assertion(url, request_data: RequestData, *args, **kwargs):
return list(request_data.multipart_data.values())[0][0] == "custom_filename"
return next(iter(request_data.multipart_data.values()))[0] == "custom_filename"

monkeypatch.setattr(bot.request, "post", make_assertion)
assert await bot.send_photo(chat_id, photo_file, filename="custom_filename")
Expand Down
2 changes: 1 addition & 1 deletion tests/_files/test_video.py
Expand Up @@ -189,7 +189,7 @@ async def make_assertion(url, request_data: RequestData, *args, **kwargs):

async def test_send_video_custom_filename(self, bot, chat_id, video_file, monkeypatch):
async def make_assertion(url, request_data: RequestData, *args, **kwargs):
return list(request_data.multipart_data.values())[0][0] == "custom_filename"
return next(iter(request_data.multipart_data.values()))[0] == "custom_filename"

monkeypatch.setattr(bot.request, "post", make_assertion)

Expand Down
2 changes: 1 addition & 1 deletion tests/_files/test_videonote.py
Expand Up @@ -169,7 +169,7 @@ async def test_send_video_note_custom_filename(
self, bot, chat_id, video_note_file, monkeypatch
):
async def make_assertion(url, request_data: RequestData, *args, **kwargs):
return list(request_data.multipart_data.values())[0][0] == "custom_filename"
return next(iter(request_data.multipart_data.values()))[0] == "custom_filename"

monkeypatch.setattr(bot.request, "post", make_assertion)

Expand Down
2 changes: 1 addition & 1 deletion tests/_files/test_voice.py
Expand Up @@ -129,7 +129,7 @@ async def test_error_without_required_args(self, bot, chat_id):

async def test_send_voice_custom_filename(self, bot, chat_id, voice_file, monkeypatch):
async def make_assertion(url, request_data: RequestData, *args, **kwargs):
return list(request_data.multipart_data.values())[0][0] == "custom_filename"
return next(iter(request_data.multipart_data.values()))[0] == "custom_filename"

monkeypatch.setattr(bot.request, "post", make_assertion)

Expand Down
3 changes: 1 addition & 2 deletions tests/_passport/test_passport.py
Expand Up @@ -418,7 +418,7 @@ def test_bot_init_invalid_key(self, bot):
with pytest.raises(TypeError):
Bot(bot.token, private_key="Invalid key!")

with pytest.raises(ValueError):
with pytest.raises(ValueError, match="Could not deserialize key data"):
Bot(bot.token, private_key=b"Invalid key!")

def test_all_types(self, passport_data, bot, all_passport_data):
Expand Down Expand Up @@ -474,7 +474,6 @@ async def test_wrong_key(self, bot):
with pytest.raises(PassportDecryptionError):
assert passport_data.decrypted_data

wrong_key = b"-----BEGIN RSA PRIVATE KEY-----\r\nMIIEogIBAAKCAQB4qCFltuvHakZze86TUweU7E/SB3VLGEHAe7GJlBmrou9SSWsL\r\nH7E++157X6UqWFl54LOE9MeHZnoW7rZ+DxLKhk6NwAHTxXPnvw4CZlvUPC3OFxg3\r\nhEmNen6ojSM4sl4kYUIa7F+Q5uMEYaboxoBen9mbj4zzMGsG4aY/xBOb2ewrXQyL\r\nRh//tk1Px4ago+lUPisAvQVecz7/6KU4Xj4Lpv2z20f3cHlZX6bb7HlE1vixCMOf\r\nxvfC5SkWEGZMR/ZoWQUsoDkrDSITF/S3GtLfg083TgtCKaOF3mCT27sJ1og77npP\r\n0cH/qdlbdoFtdrRj3PvBpaj/TtXRhmdGcJBxAgMBAAECggEAYSq1Sp6XHo8dkV8B\r\nK2/QSURNu8y5zvIH8aUrgqo8Shb7OH9bryekrB3vJtgNwR5JYHdu2wHttcL3S4SO\r\nftJQxbyHgmxAjHUVNGqOM6yPA0o7cR70J7FnMoKVgdO3q68pVY7ll50IET9/T0X9\r\nDrTdKFb+/eILFsXFS1NpeSzExdsKq3zM0sP/vlJHHYVTmZDGaGEvny/eLAS+KAfG\r\nrKP96DeO4C/peXEJzALZ/mG1ReBB05Qp9Dx1xEC20yreRk5MnnBA5oiHVG5ZLOl9\r\nEEHINidqN+TMNSkxv67xMfQ6utNu5IpbklKv/4wqQOJOO50HZ+qBtSurTN573dky\r\nzslbCQKBgQDHDUBYyKN/v69VLmvNVcxTgrOcrdbqAfefJXb9C3dVXhS8/oRkCRU/\r\ndzxYWNT7hmQyWUKor/izh68rZ/M+bsTnlaa7IdAgyChzTfcZL/2pxG9pq05GF1Q4\r\nBSJ896ZEe3jEhbpJXRlWYvz7455svlxR0H8FooCTddTmkU3nsQSx0wKBgQCbLSa4\r\nyZs2QVstQQerNjxAtLi0IvV8cJkuvFoNC2Q21oqQc7BYU7NJL7uwriprZr5nwkCQ\r\nOFQXi4N3uqimNxuSng31ETfjFZPp+pjb8jf7Sce7cqU66xxR+anUzVZqBG1CJShx\r\nVxN7cWN33UZvIH34gA2Ax6AXNnJG42B5Gn1GKwKBgQCZ/oh/p4nGNXfiAK3qB6yy\r\nFvX6CwuvsqHt/8AUeKBz7PtCU+38roI/vXF0MBVmGky+HwxREQLpcdl1TVCERpIT\r\nUFXThI9OLUwOGI1IcTZf9tby+1LtKvM++8n4wGdjp9qAv6ylQV9u09pAzZItMwCd\r\nUx5SL6wlaQ2y60tIKk0lfQKBgBJS+56YmA6JGzY11qz+I5FUhfcnpauDNGOTdGLT\r\n9IqRPR2fu7RCdgpva4+KkZHLOTLReoRNUojRPb4WubGfEk93AJju5pWXR7c6k3Bt\r\novS2mrJk8GQLvXVksQxjDxBH44sLDkKMEM3j7uYJqDaZNKbyoCWT7TCwikAau5qx\r\naRevAoGAAKZV705dvrpJuyoHFZ66luANlrAwG/vNf6Q4mBEXB7guqMkokCsSkjqR\r\nhsD79E6q06zA0QzkLCavbCn5kMmDS/AbA80+B7El92iIN6d3jRdiNZiewkhlWhEG\r\nm4N0gQRfIu+rUjsS/4xk8UuQUT/Ossjn/hExi7ejpKdCc7N++bc=\r\n-----END RSA PRIVATE KEY-----"
harshil21 marked this conversation as resolved.
Show resolved Hide resolved
async with make_bot(token=bot.token, private_key=short_key) as b:
passport_data = PassportData.de_json(RAW_PASSPORT_DATA, bot=b)
with pytest.raises(PassportDecryptionError):
Expand Down
2 changes: 1 addition & 1 deletion tests/ext/test_callbackcontext.py
Expand Up @@ -228,7 +228,7 @@ async def test_drop_callback_data(self, bot, monkeypatch, chat_id):
),
)
keyboard_uuid = app.bot.callback_data_cache.persistence_data[0][0][0]
button_uuid = list(app.bot.callback_data_cache.persistence_data[0][0][2])[0]
button_uuid = next(iter(app.bot.callback_data_cache.persistence_data[0][0][2]))
harshil21 marked this conversation as resolved.
Show resolved Hide resolved
callback_data = keyboard_uuid + button_uuid
callback_query = CallbackQuery(
id="1",
Expand Down