Skip to content

Commit

Permalink
Remove deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
FasterSpeeding committed May 31, 2023
1 parent c568c7a commit c9978ca
Show file tree
Hide file tree
Showing 21 changed files with 673 additions and 5,109 deletions.
3 changes: 1 addition & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
`error` callback can now also be [None][] when it's unknown.

### Deprecated
- [AbstractCooldownManager.check_cooldown][tanjun.dependencies.limiters.AbstractCooldownManager.check_cooldown] and
[AbstractCooldownManager.increment_cooldown][tanjun.dependencies.limiters.AbstractCooldownManager.increment_cooldown]
- `AbstractCooldownManager.check_cooldown` and `AbstractCooldownManager.increment_cooldown`
in favour of the [AbstractCooldownManager.acquire][tanjun.dependencies.limiters.AbstractCooldownManager.acquire]
and [AbstractCooldownManager.release][tanjun.dependencies.limiters.AbstractCooldownManager.release] interfaces.

Expand Down
3 changes: 0 additions & 3 deletions docs/reference/utilities.md

This file was deleted.

5 changes: 0 additions & 5 deletions tanjun/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ async def hello(ctx: tanjun.abc.Context, user: hikari.User | None) -> None:
"as_message_command",
"as_message_command_group",
"as_message_menu",
"as_self_injecting",
"as_slash_command",
"as_time_schedule",
"as_unloader",
Expand All @@ -157,7 +156,6 @@ async def hello(ctx: tanjun.abc.Context, user: hikari.User | None) -> None:
"inject",
"inject_lc",
"injected",
"injecting",
"parsing",
"permissions",
"schedules",
Expand All @@ -178,7 +176,6 @@ async def hello(ctx: tanjun.abc.Context, user: hikari.User | None) -> None:
"to_snowflake",
"to_user",
"to_voice_state",
"utilities",
"with_all_checks",
"with_any_checks",
"with_argument",
Expand Down Expand Up @@ -216,7 +213,6 @@ async def hello(ctx: tanjun.abc.Context, user: hikari.User | None) -> None:
from . import annotations
from . import context
from . import permissions
from . import utilities
from .abc import ClientCallbackNames
from .checks import with_all_checks
from .checks import with_any_checks
Expand Down Expand Up @@ -300,7 +296,6 @@ async def hello(ctx: tanjun.abc.Context, user: hikari.User | None) -> None:
from .hooks import MenuHooks
from .hooks import MessageHooks
from .hooks import SlashHooks
from .injecting import as_self_injecting
from .parsing import ShlexParser
from .parsing import with_argument
from .parsing import with_greedy_argument
Expand Down
13 changes: 0 additions & 13 deletions tanjun/abc.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,13 @@
"AnyHooks",
"AppCommand",
"AppCommandContext",
"AutocompleteCallbackSig",
"AutocompleteContext",
"AutocompleteSig",
"BaseSlashCommand",
"CheckSig",
"Client",
"ClientCallbackNames",
"ClientLoader",
"CommandCallbackSig",
"Component",
"Context",
"ErrorHookSig",
Expand All @@ -54,7 +52,6 @@
"ListenerCallbackSig",
"MenuCallbackSig",
"MenuCommand",
"MenuCommandCallbackSig",
"MenuContext",
"MenuHooks",
"MessageCommand",
Expand Down Expand Up @@ -120,9 +117,6 @@
)
_MenuValueT = typing.TypeVar("_MenuValueT", hikari.Message, hikari.InteractionMember)

CommandCallbackSig = collections.Callable[..., _CoroT[None]]
"""Deprecated type hint used to represent any command callback."""

MetaEventSig = collections.Callable[..., typing.Union[_CoroT[None], None]]
"""Type hint of a client callback.
Expand Down Expand Up @@ -272,13 +266,6 @@
_EventT = typing.TypeVar("_EventT", bound=hikari.Event)
ListenerCallbackSig = types.GenericAlias(collections.Callable[..., typing.Any], (_EventT,))


AutocompleteCallbackSig = AutocompleteSig[_AutocompleteValueT]
"""Deprecated alias of [AutocompleteSig][tanjun.abc.AutocompleteSig]."""

MenuCommandCallbackSig = MenuCallbackSig[_MenuValueT]
"""Deprecated alias of [MenuCallbackSig][tanjun.abc.MenuCallbackSig]."""

_MenuCallbackSigT = typing.TypeVar("_MenuCallbackSigT", bound=MenuCallbackSig[typing.Any])
_MessageCallbackSigT = typing.TypeVar("_MessageCallbackSigT", bound=MessageCallbackSig)
_SlashCallbackSigT = typing.TypeVar("_SlashCallbackSigT", bound=SlashCallbackSig)
Expand Down
Loading

0 comments on commit c9978ca

Please sign in to comment.