From d58fc0cceed63b9536a2151168b0e40144ba5d81 Mon Sep 17 00:00:00 2001 From: Hornwitser Date: Tue, 12 Jun 2018 05:05:00 +0200 Subject: [PATCH] [lint] Remove unused imports Left over from various refactoring and rewrites. --- discord/__main__.py | 2 -- discord/emoji.py | 1 - discord/ext/commands/bot.py | 2 +- discord/ext/commands/context.py | 1 - discord/ext/commands/converter.py | 2 -- discord/ext/commands/formatter.py | 1 - discord/gateway.py | 2 +- discord/http.py | 1 - discord/invite.py | 2 -- discord/iterators.py | 1 - discord/member.py | 1 - discord/message.py | 2 +- discord/relationship.py | 2 -- discord/role.py | 2 -- discord/state.py | 1 - discord/user.py | 1 - 16 files changed, 3 insertions(+), 21 deletions(-) diff --git a/discord/__main__.py b/discord/__main__.py index d40d404d9..6be6fc6c6 100644 --- a/discord/__main__.py +++ b/discord/__main__.py @@ -28,8 +28,6 @@ import discord import argparse import sys from pathlib import Path -import os -import re def core(parser, args): pass diff --git a/discord/emoji.py b/discord/emoji.py index 158000fba..b69773227 100644 --- a/discord/emoji.py +++ b/discord/emoji.py @@ -24,7 +24,6 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ -import asyncio from collections import namedtuple from . import utils diff --git a/discord/ext/commands/bot.py b/discord/ext/commands/bot.py index b65565928..71ec5189a 100644 --- a/discord/ext/commands/bot.py +++ b/discord/ext/commands/bot.py @@ -33,7 +33,7 @@ import sys import traceback import re -from .core import GroupMixin, Command, command +from .core import GroupMixin, Command from .view import StringView from .context import Context from .errors import CommandNotFound, CommandError diff --git a/discord/ext/commands/context.py b/discord/ext/commands/context.py index dfe1a9edb..de37a1a7d 100644 --- a/discord/ext/commands/context.py +++ b/discord/ext/commands/context.py @@ -23,7 +23,6 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ -import asyncio import discord.abc import discord.utils diff --git a/discord/ext/commands/converter.py b/discord/ext/commands/converter.py index 72b2cbf85..bb3a57084 100644 --- a/discord/ext/commands/converter.py +++ b/discord/ext/commands/converter.py @@ -25,12 +25,10 @@ DEALINGS IN THE SOFTWARE. """ import discord -import asyncio import re import inspect from .errors import BadArgument, NoPrivateMessage -from .view import StringView __all__ = [ 'Converter', 'MemberConverter', 'UserConverter', 'TextChannelConverter', 'InviteConverter', 'RoleConverter', diff --git a/discord/ext/commands/formatter.py b/discord/ext/commands/formatter.py index f65e29dcb..f23a697bb 100644 --- a/discord/ext/commands/formatter.py +++ b/discord/ext/commands/formatter.py @@ -26,7 +26,6 @@ DEALINGS IN THE SOFTWARE. import itertools import inspect -import asyncio from .core import GroupMixin, Command from .errors import CommandError diff --git a/discord/gateway.py b/discord/gateway.py index db5809b60..c8bc17e5b 100644 --- a/discord/gateway.py +++ b/discord/gateway.py @@ -30,7 +30,7 @@ import websockets import asyncio from . import utils -from .activity import create_activity, _ActivityTag +from .activity import _ActivityTag from .errors import ConnectionClosed, InvalidArgument import logging import zlib, json diff --git a/discord/http.py b/discord/http.py index a40db3438..dac71681d 100644 --- a/discord/http.py +++ b/discord/http.py @@ -30,7 +30,6 @@ import json import sys import logging import weakref -import datetime from urllib.parse import quote as _uriquote log = logging.getLogger(__name__) diff --git a/discord/invite.py b/discord/invite.py index 868eccaab..47d551595 100644 --- a/discord/invite.py +++ b/discord/invite.py @@ -24,8 +24,6 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ -import asyncio - from .utils import parse_time from .mixins import Hashable from .object import Object diff --git a/discord/iterators.py b/discord/iterators.py index bf0077be0..4d238512d 100644 --- a/discord/iterators.py +++ b/discord/iterators.py @@ -24,7 +24,6 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ -import sys import asyncio import datetime diff --git a/discord/member.py b/discord/member.py index 792313d31..c714916d6 100644 --- a/discord/member.py +++ b/discord/member.py @@ -24,7 +24,6 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ -import asyncio import itertools import copy diff --git a/discord/message.py b/discord/message.py index dc55c72a1..526738e84 100644 --- a/discord/message.py +++ b/discord/message.py @@ -32,7 +32,7 @@ from .reaction import Reaction from .emoji import Emoji, PartialEmoji from .calls import CallMessage from .enums import MessageType, try_enum -from .errors import InvalidArgument, ClientException, HTTPException, NotFound +from .errors import InvalidArgument, ClientException from .embeds import Embed class Attachment: diff --git a/discord/relationship.py b/discord/relationship.py index b301d420c..b611de3c3 100644 --- a/discord/relationship.py +++ b/discord/relationship.py @@ -26,8 +26,6 @@ DEALINGS IN THE SOFTWARE. from .enums import RelationshipType, try_enum -import asyncio - class Relationship: """Represents a relationship in Discord. diff --git a/discord/role.py b/discord/role.py index 5cee019be..151e2db6a 100644 --- a/discord/role.py +++ b/discord/role.py @@ -24,8 +24,6 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ -import asyncio - from .permissions import Permissions from .errors import InvalidArgument from .colour import Colour diff --git a/discord/state.py b/discord/state.py index 22978e93f..779a4a9d1 100644 --- a/discord/state.py +++ b/discord/state.py @@ -35,7 +35,6 @@ from .raw_models import * from .member import Member from .role import Role from .enums import ChannelType, try_enum, Status -from .calls import GroupCall from . import utils from .embeds import Embed diff --git a/discord/user.py b/discord/user.py index 8e87520eb..e5d3810ad 100644 --- a/discord/user.py +++ b/discord/user.py @@ -31,7 +31,6 @@ from .errors import ClientException, InvalidArgument from collections import namedtuple import discord.abc -import asyncio VALID_STATIC_FORMATS = {"jpeg", "jpg", "webp", "png"} VALID_AVATAR_FORMATS = VALID_STATIC_FORMATS | {"gif"}