From abf7a26cf933f795ace2862229ea93b34240d6f1 Mon Sep 17 00:00:00 2001 From: Hinrich Mahler <22366557+Bibo-Joshi@users.noreply.github.com> Date: Thu, 2 Jan 2025 08:47:29 +0100 Subject: [PATCH] Ensure Forward Compatibility of `Gift` and `Gifts` --- telegram/_gifts.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/telegram/_gifts.py b/telegram/_gifts.py index fa26eacb77a..4d4ab4eb112 100644 --- a/telegram/_gifts.py +++ b/telegram/_gifts.py @@ -90,7 +90,7 @@ def de_json(cls, data: Optional[JSONDict], bot: Optional["Bot"] = None) -> Optio return None data["sticker"] = Sticker.de_json(data.get("sticker"), bot) - return cls(**data) + return super().de_json(data=data, bot=bot) class Gifts(TelegramObject): @@ -133,4 +133,4 @@ def de_json(cls, data: Optional[JSONDict], bot: Optional["Bot"] = None) -> Optio return None data["gifts"] = Gift.de_list(data.get("gifts"), bot) - return cls(**data) + return super().de_json(data=data, bot=bot) pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy