diff options
| author | Nadir Chowdhury <[email protected]> | 2021-04-10 07:53:24 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-04-10 02:53:24 -0400 |
| commit | 3e92196a2bdcf57dfcbd8e277737345af1d35330 (patch) | |
| tree | 381dba2a0401a016beebc4200af09eb34d149f94 /discord/utils.py | |
| parent | [commands]Add typing.Literal converter (diff) | |
| download | discord.py-3e92196a2bdcf57dfcbd8e277737345af1d35330.tar.xz discord.py-3e92196a2bdcf57dfcbd8e277737345af1d35330.zip | |
Add typings for audit logs, integrations, and webhooks
Diffstat (limited to 'discord/utils.py')
| -rw-r--r-- | discord/utils.py | 4 |
1 files changed, 2 insertions, 2 deletions
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: |