Skip to content

Commit c358882

Browse files
author
Zaid
committed
Add return type hints for get_chat_gifts and get_gift_upgrade_preview methods
1 parent 59e0c2e commit c358882

2 files changed

Lines changed: 3 additions & 6 deletions

File tree

pyrogram/methods/payments/get_chat_gifts.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# You should have received a copy of the GNU Lesser General Public License
1717
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
1818

19-
from typing import Optional, Union
19+
from typing import Optional, Union, AsyncGenerator
2020

2121
import pyrogram
2222
from pyrogram import raw, types
@@ -34,7 +34,7 @@ async def get_chat_gifts(
3434
sort_by_price: Optional[bool] = None,
3535
limit: int = 0,
3636
offset: str = ""
37-
):
37+
) -> AsyncGenerator["types.Gift", None]:
3838
"""Get all gifts owned by specified chat.
3939
4040
.. include:: /_includes/usable-by/users.rst

pyrogram/methods/payments/get_gift_upgrade_preview.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@
1515
#
1616
# You should have received a copy of the GNU Lesser General Public License
1717
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
18-
19-
import re
20-
2118
import pyrogram
2219
from pyrogram import raw, types
2320

@@ -26,7 +23,7 @@ class GetGiftUpgradePreview:
2623
async def get_gift_upgrade_preview(
2724
self: "pyrogram.Client",
2825
gift_id: int
29-
):
26+
) -> "types.GiftUpgradePreview":
3027
"""Return examples of possible upgraded gifts for a regular gift.
3128
3229
.. include:: /_includes/usable-by/users.rst

0 commit comments

Comments
 (0)