Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
FasterSpeeding committed Dec 1, 2024
1 parent 6094b65 commit 313ac28
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
3 changes: 1 addition & 2 deletions tanjun/_internal/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,7 @@ async def gather_checks(
Parameters
----------
alluka_ctx : alluka.abc.Context
The Alluka context to use for dependency injection. ctx : tanjun.abc.Context
ctx : tanjun.abc.Context
The context to check.
checks : collections.abc.Iterable[tanjun.abc.CheckSig]
An iterable of injectable checks.
Expand Down
2 changes: 1 addition & 1 deletion tanjun/components.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@

from . import _internal
from . import abc as tanjun
import alluka

if typing.TYPE_CHECKING:
from typing import Self

import alluka

from . import schedules as schedules_

Expand Down
5 changes: 3 additions & 2 deletions tanjun/context/autocomplete.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ def injection_client(self) -> alluka.Client:
return self._client.injector

@typing_extensions.deprecated("Using a Tanjun context as an Alluka context is deprecated")
def cache_result(self, callback: alluka.CallbackSig[_T], value: _T, /) -> None:
def cache_result(self, callback: alluka.CallbackSig[_T], value: _T, /) -> None: # noqa: ARG002
return None

@typing.overload
Expand Down Expand Up @@ -285,7 +285,8 @@ def get_cached_result(self, callback: alluka.CallbackSig[_T], /, *, default: _De

@typing_extensions.deprecated("Using a Tanjun context as an Alluka context is deprecated")
def get_cached_result(
self, callback: alluka.CallbackSig[_T], /, *, default: _DefaultT | tanjun.NoDefault = tanjun.NO_DEFAULT
self, callback: alluka.CallbackSig[_T], # noqa: ARG002
/, *, default: _DefaultT | tanjun.NoDefault = tanjun.NO_DEFAULT
) -> _T | _DefaultT:
if default is tanjun.NO_DEFAULT:
raise KeyError
Expand Down
5 changes: 3 additions & 2 deletions tanjun/context/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ def injection_client(self) -> alluka.Client:
return self._client.injector

@typing_extensions.deprecated("Using a Tanjun context as an Alluka context is deprecated")
def cache_result(self, callback: alluka.CallbackSig[_T], value: _T, /) -> None:
def cache_result(self, callback: alluka.CallbackSig[_T], value: _T, /) -> None: # noqa: ARG002
return None

@typing.overload
Expand Down Expand Up @@ -210,7 +210,8 @@ def get_cached_result(self, callback: alluka.CallbackSig[_T], /, *, default: _De

@typing_extensions.deprecated("Using a Tanjun context as an Alluka context is deprecated")
def get_cached_result(
self, callback: alluka.CallbackSig[_T], /, *, default: tanjun.NoDefault | _DefaultT = tanjun.NO_DEFAULT
self, callback: alluka.CallbackSig[_T], # noqa: ARG002
/, *, default: tanjun.NoDefault | _DefaultT = tanjun.NO_DEFAULT
) -> _T | _DefaultT:
if default is tanjun.NO_DEFAULT:
raise KeyError
Expand Down
3 changes: 1 addition & 2 deletions tanjun/dependencies/limiters.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,14 @@
from . import async_cache
from . import locales
from . import owners
import alluka

if typing.TYPE_CHECKING:
import contextlib
import types
from collections import abc as collections
from typing import Self

import alluka

_CommandT = typing.TypeVar("_CommandT", bound=tanjun.ExecutableCommand[typing.Any])
_InnerResourceSig = collections.Callable[[], "_InnerResourceT"]

Expand Down

0 comments on commit 313ac28

Please sign in to comment.