Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prune some type hints from __all__s #710

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
12 changes: 0 additions & 12 deletions tanjun/abc.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,37 +32,25 @@
from __future__ import annotations

__all__: list[str] = [
"AnyCheckSig",
"AnyHooks",
"AppCommand",
"AppCommandContext",
"AutocompleteCallbackSig",
"AutocompleteContext",
"AutocompleteSig",
"BaseSlashCommand",
"CheckSig",
"Client",
"ClientCallbackNames",
"ClientLoader",
"CommandCallbackSig",
"Component",
"Context",
"ErrorHookSig",
"ExecutableCommand",
"HookSig",
"Hooks",
"ListenerCallbackSig",
"MenuCallbackSig",
"MenuCommand",
"MenuCommandCallbackSig",
"MenuContext",
"MenuHooks",
"MessageCommand",
"MessageCommandGroup",
"MessageContext",
"MessageHooks",
"MetaEventSig",
"ParserHookSig",
"SlashCommand",
"SlashCommandGroup",
"SlashContext",
Expand Down
1 change: 0 additions & 1 deletion tanjun/clients.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
"ClientCallbackNames",
"InteractionAcceptsEnum",
"MessageAcceptsEnum",
"PrefixGetterSig",
"as_loader",
"as_unloader",
"on_parser_error",
Expand Down
2 changes: 0 additions & 2 deletions tanjun/commands/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
from __future__ import annotations

__all__: list[str] = [
"BaseSlashCommand",
"MenuCommand",
"MessageCommand",
"MessageCommandGroup",
Expand Down Expand Up @@ -64,7 +63,6 @@
from .message import MessageCommandGroup
from .message import as_message_command
from .message import as_message_command_group
from .slash import BaseSlashCommand
from .slash import SlashCommand
from .slash import SlashCommandGroup
from .slash import as_slash_command
Expand Down
2 changes: 1 addition & 1 deletion tanjun/commands/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"""Base command implementations."""
from __future__ import annotations

__all__: list[str] = ["PartialCommand"]
__all__: list[str] = []

import copy
import typing
Expand Down
3 changes: 0 additions & 3 deletions tanjun/commands/slash.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,8 @@
from __future__ import annotations

__all__: list[str] = [
"BaseSlashCommand",
"ConverterSig",
"SlashCommand",
"SlashCommandGroup",
"UNDEFINED_DEFAULT",
"as_slash_command",
"slash_command_group",
"with_attachment_slash_option",
Expand Down
2 changes: 1 addition & 1 deletion tanjun/components.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"""Standard implementation of Tanjun's "components" used to manage separate features within a client."""
from __future__ import annotations

__all__: list[str] = ["AbstractComponentLoader", "Component", "OnCallbackSig"]
__all__: list[str] = ["Component"]

import abc
import asyncio
Expand Down
3 changes: 1 addition & 2 deletions tanjun/context/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,9 @@
"""Standard implementations of Tanjun's context classes."""
from __future__ import annotations

__all__: list[str] = ["AutocompleteContext", "MenuContext", "MessageContext", "SlashContext", "SlashOption"]
__all__: list[str] = ["AutocompleteContext", "MenuContext", "MessageContext", "SlashContext"]

from .autocomplete import AutocompleteContext
from .menu import MenuContext
from .message import MessageContext
from .slash import SlashContext
from .slash import SlashOption
2 changes: 1 addition & 1 deletion tanjun/context/slash.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"""Slash command implementation."""
from __future__ import annotations

__all__: list[str] = ["SlashContext", "SlashOption"]
__all__: list[str] = ["SlashContext"]

import asyncio
import datetime
Expand Down
11 changes: 0 additions & 11 deletions tanjun/conversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,6 @@
from __future__ import annotations

__all__: list[str] = [
"ToChannel",
"ToEmoji",
"ToGuild",
"ToInvite",
"ToInviteWithMetadata",
"ToMember",
"ToMessage",
"ToPresence",
"ToRole",
"ToUser",
"ToVoiceState",
"from_datetime",
"parse_channel_id",
"parse_emoji_id",
Expand Down
5 changes: 0 additions & 5 deletions tanjun/dependencies/limiters.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,7 @@
from __future__ import annotations

__all__: list[str] = [
"AbstractConcurrencyLimiter",
"AbstractCooldownManager",
"BucketResource",
"ConcurrencyPostExecution",
"ConcurrencyPreExecution",
"CooldownPreExecution",
"InMemoryConcurrencyLimiter",
"InMemoryCooldownManager",
"with_concurrency_limit",
Expand Down
2 changes: 1 addition & 1 deletion tanjun/dependencies/locales.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"""Dependency used for managing localising strings around interactions commands."""
from __future__ import annotations

__all__: list[str] = ["AbstractLocaliser", "AbstractLocalizer", "BasicLocaliser", "BasicLocalizer"]
__all__: list[str] = ["BasicLocaliser", "BasicLocalizer"]

import abc
import typing
Expand Down
2 changes: 1 addition & 1 deletion tanjun/dependencies/owners.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"""Dependency used for managing owner checks."""
from __future__ import annotations

__all__: list[str] = ["AbstractOwners", "Owners"]
__all__: list[str] = ["Owners"]

import abc
import asyncio
Expand Down
7 changes: 0 additions & 7 deletions tanjun/parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,7 @@
from __future__ import annotations

__all__: list[str] = [
"AbstractOptionParser",
"Argument",
"ConverterSig",
"Option",
"Parameter",
"ShlexParser",
"UNDEFINED",
"UndefinedT",
"with_argument",
"with_greedy_argument",
"with_multi_argument",
Expand Down
2 changes: 0 additions & 2 deletions tanjun/permissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
from __future__ import annotations

__all__: list[str] = [
"ALL_PERMISSIONS",
"DM_PERMISSIONS",
"calculate_everyone_permissions",
"calculate_permissions",
"fetch_everyone_permissions",
Expand Down
2 changes: 1 addition & 1 deletion tanjun/schedules.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"""Interface and interval implementation for a Tanjun based callback scheduler."""
from __future__ import annotations

__all__: list[str] = ["AbstractSchedule", "IntervalSchedule", "TimeSchedule", "as_interval", "as_time_schedule"]
__all__: list[str] = ["IntervalSchedule", "TimeSchedule", "as_interval", "as_time_schedule"]

import abc
import asyncio
Expand Down
Loading