From 56cbe650afdc102aeb7d453b339ff903e752862d Mon Sep 17 00:00:00 2001 From: Hinrich Mahler <22366557+Bibo-Joshi@users.noreply.github.com> Date: Mon, 30 Dec 2024 15:34:58 +0100 Subject: [PATCH] More failures & one Improvement in TO --- telegram/_files/sticker.py | 1 + telegram/_telegramobject.py | 2 +- tests/auxil/bot_method_checks.py | 1 - 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/telegram/_files/sticker.py b/telegram/_files/sticker.py index fbc6a81b0..9d412ef8e 100644 --- a/telegram/_files/sticker.py +++ b/telegram/_files/sticker.py @@ -305,6 +305,7 @@ class StickerSet(TelegramObject): @classmethod def de_json(cls, data: JSONDict, bot: Optional["Bot"] = None) -> "StickerSet": """See :meth:`telegram.TelegramObject.de_json`.""" + data = cls._parse_data(data) data["thumbnail"] = de_json_wo(data.get("thumbnail"), PhotoSize, bot) data["stickers"] = Sticker.de_list(data["stickers"], bot) diff --git a/telegram/_telegramobject.py b/telegram/_telegramobject.py index d8858e56c..c668e1df2 100644 --- a/telegram/_telegramobject.py +++ b/telegram/_telegramobject.py @@ -454,7 +454,7 @@ class TelegramObject: A tuple of Telegram objects. """ - return tuple(obj for obj in (cls.de_json(d, bot) for d in data)) + return tuple(cls.de_json(d, bot) for d in data) @contextmanager def _unfrozen(self: Tele_co) -> Iterator[Tele_co]: diff --git a/tests/auxil/bot_method_checks.py b/tests/auxil/bot_method_checks.py index 3566bc616..da6a42c4d 100644 --- a/tests/auxil/bot_method_checks.py +++ b/tests/auxil/bot_method_checks.py @@ -403,7 +403,6 @@ def guess_return_type_name(method: Callable[[...], Any]) -> tuple[Union[str, obj # and string annotations. But it also wants to resolve the parameter annotations, which # need additional namespaces and that's not worth the struggle for now … return_annotation = _check_forward_ref(inspect.signature(method).return_annotation) - print(return_annotation, type(return_annotation)) as_tuple = False if isinstance(return_annotation, GenericAlias):