From f6b914e8c98c7a49e60e34bb0461583fa1988669 Mon Sep 17 00:00:00 2001 From: plun1331 Date: Fri, 4 Oct 2024 13:06:09 -0700 Subject: [PATCH] fix: add Member import for typehinting (#2596) * fix: add Member import Signed-off-by: plun1331 * style(pre-commit): auto fixes from pre-commit.com hooks --------- Signed-off-by: plun1331 Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- discord/bot.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/discord/bot.py b/discord/bot.py index f97701f8f3..0f9b30480c 100644 --- a/discord/bot.py +++ b/discord/bot.py @@ -34,7 +34,16 @@ import sys import traceback from abc import ABC, abstractmethod -from typing import Any, Callable, Coroutine, Generator, Literal, Mapping, TypeVar +from typing import ( + TYPE_CHECKING, + Any, + Callable, + Coroutine, + Generator, + Literal, + Mapping, + TypeVar, +) from .client import Client from .cog import CogMixin @@ -56,6 +65,9 @@ from .user import User from .utils import MISSING, async_all, find, get +if TYPE_CHECKING: + from .member import Member + CoroFunc = Callable[..., Coroutine[Any, Any, Any]] CFT = TypeVar("CFT", bound=CoroFunc)