From 5efb69b2070ee972dd58401c06c0313513593a38 Mon Sep 17 00:00:00 2001 From: Hassan Abouelela Date: Sun, 26 Jun 2022 21:42:07 +0400 Subject: Replace Typing Generics Replaces all typing generics with collection equivalents as per PEP 585. `typing.Callable` was not included in this due to a sphinx-autodoc bug not handling it well. Signed-off-by: Hassan Abouelela --- botcore/utils/members.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'botcore/utils/members.py') diff --git a/botcore/utils/members.py b/botcore/utils/members.py index 10513953..1536a8d1 100644 --- a/botcore/utils/members.py +++ b/botcore/utils/members.py @@ -1,5 +1,6 @@ """Useful helper functions for interactin with :obj:`discord.Member` objects.""" import typing +from collections import abc import discord @@ -29,7 +30,7 @@ async def get_or_fetch_member(guild: discord.Guild, member_id: int) -> typing.Op async def handle_role_change( member: discord.Member, - coro: typing.Callable[[discord.Role], typing.Coroutine], + coro: typing.Callable[[discord.Role], abc.Coroutine], role: discord.Role ) -> None: """ -- cgit v1.2.3