From 3e92196a2bdcf57dfcbd8e277737345af1d35330 Mon Sep 17 00:00:00 2001 From: Nadir Chowdhury Date: Sat, 10 Apr 2021 07:53:24 +0100 Subject: Add typings for audit logs, integrations, and webhooks --- discord/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'discord/utils.py') diff --git a/discord/utils.py b/discord/utils.py index 2f151be1..7fb1d7ef 100644 --- a/discord/utils.py +++ b/discord/utils.py @@ -25,7 +25,7 @@ DEALINGS IN THE SOFTWARE. import array import asyncio import collections.abc -from typing import Optional, overload +from typing import Any, Optional, overload import unicodedata from base64 import b64encode from bisect import bisect_left @@ -325,7 +325,7 @@ def _unique(iterable): adder = seen.add return [x for x in iterable if not (x in seen or adder(x))] -def _get_as_snowflake(data, key): +def _get_as_snowflake(data: Any, key: str) -> Optional[int]: try: value = data[key] except KeyError: -- cgit v1.2.3