Browse Source

Remove unused imports

pull/7831/head
Kellen 3 years ago
committed by GitHub
parent
commit
0f18d93e47
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      discord/colour.py
  2. 2
      discord/ext/commands/context.py
  3. 2
      discord/ext/commands/errors.py
  4. 2
      discord/gateway.py
  5. 2
      discord/reaction.py
  6. 2
      discord/role.py
  7. 2
      discord/types/invite.py
  8. 1
      discord/ui/modal.py
  9. 2
      discord/widget.py

9
discord/colour.py

@ -26,14 +26,7 @@ from __future__ import annotations
import colorsys
import random
from typing import (
TYPE_CHECKING,
Any,
Callable,
Optional,
Tuple,
Union,
)
from typing import TYPE_CHECKING, Optional, Tuple, Union
if TYPE_CHECKING:
from typing_extensions import Self

2
discord/ext/commands/context.py

@ -45,10 +45,8 @@ if TYPE_CHECKING:
from discord.user import ClientUser, User
from discord.voice_client import VoiceProtocol
from .bot import Bot, AutoShardedBot
from .cog import Cog
from .core import Command
from .help import HelpCommand
from .view import StringView
# fmt: off

2
discord/ext/commands/errors.py

@ -24,7 +24,7 @@ DEALINGS IN THE SOFTWARE.
from __future__ import annotations
from typing import Optional, Any, TYPE_CHECKING, List, Callable, Type, Tuple, Union
from typing import Optional, Any, TYPE_CHECKING, List, Callable, Tuple, Union
from discord.errors import ClientException, DiscordException

2
discord/gateway.py

@ -34,7 +34,7 @@ import threading
import traceback
import zlib
from typing import Any, Callable, Coroutine, Deque, Dict, List, TYPE_CHECKING, NamedTuple, Optional, TypeVar, Type
from typing import Any, Callable, Coroutine, Deque, Dict, List, TYPE_CHECKING, NamedTuple, Optional, TypeVar
import aiohttp

2
discord/reaction.py

@ -23,7 +23,7 @@ DEALINGS IN THE SOFTWARE.
"""
from __future__ import annotations
from typing import Any, TYPE_CHECKING, AsyncIterator, Union, Optional
from typing import TYPE_CHECKING, AsyncIterator, Union, Optional
from .user import User
from .object import Object

2
discord/role.py

@ -37,8 +37,6 @@ __all__ = (
)
if TYPE_CHECKING:
from typing_extensions import Self
import datetime
from .types.role import (
Role as RolePayload,

2
discord/types/invite.py

@ -25,7 +25,7 @@ DEALINGS IN THE SOFTWARE.
from __future__ import annotations
from typing import Literal, Optional, TypedDict, Union
from typing_extensions import NotRequired, Required
from typing_extensions import NotRequired
from .scheduled_event import GuildScheduledEvent
from .snowflake import Snowflake

1
discord/ui/modal.py

@ -28,7 +28,6 @@ import asyncio
import logging
import os
import sys
import time
import traceback
from copy import deepcopy
from typing import TYPE_CHECKING, Any, Dict, Optional, Sequence, ClassVar, List

2
discord/widget.py

@ -24,7 +24,7 @@ DEALINGS IN THE SOFTWARE.
from __future__ import annotations
from typing import Any, List, Optional, TYPE_CHECKING, Union
from typing import List, Optional, TYPE_CHECKING, Union
from .utils import snowflake_time, _get_as_snowflake, resolve_invite
from .user import BaseUser

Loading…
Cancel
Save