From 4c8b1f9abd3ecd355926cb0eedf687bc68c32eda Mon Sep 17 00:00:00 2001 From: Rapptz Date: Sat, 5 Mar 2022 21:40:42 -0500 Subject: [PATCH] Remove unused imports --- discord/integrations.py | 2 +- discord/interactions.py | 2 +- discord/permissions.py | 2 +- discord/reaction.py | 2 +- discord/state.py | 1 - discord/template.py | 2 +- discord/types/gateway.py | 2 +- discord/types/interactions.py | 2 +- discord/ui/select.py | 2 +- discord/ui/view.py | 1 - discord/utils.py | 1 - discord/widget.py | 3 +-- 12 files changed, 9 insertions(+), 13 deletions(-) diff --git a/discord/integrations.py b/discord/integrations.py index 09bccc950..384ff1b98 100644 --- a/discord/integrations.py +++ b/discord/integrations.py @@ -25,7 +25,7 @@ DEALINGS IN THE SOFTWARE. from __future__ import annotations import datetime -from typing import Any, Dict, Optional, TYPE_CHECKING, overload, Type, Tuple +from typing import Any, Dict, Optional, TYPE_CHECKING, Type, Tuple from .utils import _get_as_snowflake, parse_time, MISSING from .user import User from .enums import try_enum, ExpireBehaviour diff --git a/discord/interactions.py b/discord/interactions.py index d2c6bfd58..383c3d2df 100644 --- a/discord/interactions.py +++ b/discord/interactions.py @@ -25,7 +25,7 @@ DEALINGS IN THE SOFTWARE. """ from __future__ import annotations -from typing import Any, Dict, Generic, List, Optional, TYPE_CHECKING, Tuple, TypeVar, Union +from typing import Any, Dict, List, Optional, TYPE_CHECKING, Tuple, Union import asyncio from . import utils diff --git a/discord/permissions.py b/discord/permissions.py index e8e2b440c..5c81f8445 100644 --- a/discord/permissions.py +++ b/discord/permissions.py @@ -24,7 +24,7 @@ DEALINGS IN THE SOFTWARE. from __future__ import annotations -from typing import Callable, Any, ClassVar, Dict, Iterator, Set, TYPE_CHECKING, Tuple, Type, TypeVar, Optional +from typing import Callable, Any, ClassVar, Dict, Iterator, Set, TYPE_CHECKING, Tuple, Optional from .flags import BaseFlags, flag_value, fill_with_flags, alias_flag_value __all__ = ( diff --git a/discord/reaction.py b/discord/reaction.py index 1ffa2d09d..db8d0f7e6 100644 --- a/discord/reaction.py +++ b/discord/reaction.py @@ -23,7 +23,7 @@ DEALINGS IN THE SOFTWARE. """ from __future__ import annotations -from typing import Any, TYPE_CHECKING, AsyncIterator, List, Union, Optional +from typing import Any, TYPE_CHECKING, AsyncIterator, Union, Optional from .object import Object diff --git a/discord/state.py b/discord/state.py index e3baa1d10..ef61471ab 100644 --- a/discord/state.py +++ b/discord/state.py @@ -32,7 +32,6 @@ import itertools import logging from typing import ( Dict, - Generic, Optional, TYPE_CHECKING, Union, diff --git a/discord/template.py b/discord/template.py index e586761f8..490757ed0 100644 --- a/discord/template.py +++ b/discord/template.py @@ -25,7 +25,7 @@ DEALINGS IN THE SOFTWARE. from __future__ import annotations from typing import Any, Optional, TYPE_CHECKING -from .utils import parse_time, _get_as_snowflake, _bytes_to_base64_data, MISSING +from .utils import parse_time, _bytes_to_base64_data, MISSING from .guild import Guild # fmt: off diff --git a/discord/types/gateway.py b/discord/types/gateway.py index dc3af8165..1935bf041 100644 --- a/discord/types/gateway.py +++ b/discord/types/gateway.py @@ -33,7 +33,7 @@ from .channel import ChannelType, StageInstance from .interactions import Interaction from .invite import InviteTargetType from .emoji import Emoji, PartialEmoji -from .member import Member, MemberWithUser +from .member import MemberWithUser from .snowflake import Snowflake from .message import Message from .sticker import GuildSticker diff --git a/discord/types/interactions.py b/discord/types/interactions.py index 1619734ea..470ac8754 100644 --- a/discord/types/interactions.py +++ b/discord/types/interactions.py @@ -27,7 +27,7 @@ from __future__ import annotations from typing import TYPE_CHECKING, Dict, List, Literal, TypedDict, Union -from .channel import ChannelType, ChannelTypeWithoutThread, ThreadMetadata +from .channel import ChannelTypeWithoutThread, ThreadMetadata from .threads import ThreadType from .member import Member from .message import Attachment diff --git a/discord/ui/select.py b/discord/ui/select.py index 777d57e06..e1dfd9ea1 100644 --- a/discord/ui/select.py +++ b/discord/ui/select.py @@ -23,7 +23,7 @@ DEALINGS IN THE SOFTWARE. """ from __future__ import annotations -from typing import List, Optional, TYPE_CHECKING, Tuple, TypeVar, Type, Callable, Union +from typing import List, Optional, TYPE_CHECKING, Tuple, TypeVar, Callable, Union import inspect import os diff --git a/discord/ui/view.py b/discord/ui/view.py index 02cb35bf4..32fbbda94 100644 --- a/discord/ui/view.py +++ b/discord/ui/view.py @@ -41,7 +41,6 @@ from ..components import ( Button as ButtonComponent, SelectMenu as SelectComponent, ) -from ..utils import MISSING # fmt: off __all__ = ( diff --git a/discord/utils.py b/discord/utils.py index f6280ec61..4da48ccd0 100644 --- a/discord/utils.py +++ b/discord/utils.py @@ -25,7 +25,6 @@ from __future__ import annotations import array import asyncio -import inspect from typing import ( Any, AsyncIterable, diff --git a/discord/widget.py b/discord/widget.py index f64f8da41..0a828b08b 100644 --- a/discord/widget.py +++ b/discord/widget.py @@ -23,13 +23,12 @@ DEALINGS IN THE SOFTWARE. """ from __future__ import annotations -from sqlite3 import connect from typing import Any, List, Optional, TYPE_CHECKING, Union from .utils import snowflake_time, _get_as_snowflake, resolve_invite from .user import BaseUser -from .activity import Activity, BaseActivity, Spotify, create_activity +from .activity import BaseActivity, Spotify, create_activity from .invite import Invite from .enums import Status, try_enum