From bee6402d8413af8371c0c27dd52e04ac3348201e Mon Sep 17 00:00:00 2001 From: Rapptz Date: Sun, 18 Apr 2021 09:23:53 -0400 Subject: [PATCH] Fix utils.find predicate typing to accept Any --- discord/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/discord/utils.py b/discord/utils.py index bab268252..06a4dea21 100644 --- a/discord/utils.py +++ b/discord/utils.py @@ -295,7 +295,7 @@ def time_snowflake(dt: datetime.datetime, high: bool = False) -> int: return (discord_millis << 22) + (2 ** 22 - 1 if high else 0) -def find(predicate: Callable[[T], bool], seq: Iterable[T]) -> Optional[T]: +def find(predicate: Callable[[T], Any], seq: Iterable[T]) -> Optional[T]: """A helper to return the first element found in the sequence that meets the predicate. For example: ::