More failures & one Improvement in TO

This commit is contained in:
Hinrich Mahler 2024-12-30 15:34:58 +01:00
parent 0a1b976ac1
commit 56cbe650af
3 changed files with 2 additions and 2 deletions

View file

@ -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)

View file

@ -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]:

View file

@ -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):