Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Aug 14, 2022
1 parent ce5c618 commit 014a6ea
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion tanjun/abc.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@
"HookSig",
"Hooks",
"ListenerCallbackSig",
"MenuCommand",
"MenuCallbackSig",
"MenuCommand",
"MenuContext",
"MenuHooks",
"MessageCommand",
Expand Down
12 changes: 4 additions & 8 deletions tanjun/commands/menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,7 @@ def __call__(self, _: _AnyCommandT[_AnyCallbackSigT], /) -> MenuCommand[_AnyCall
def __call__(self, _: _MenuCommandCallbackSigT, /) -> MenuCommand[_MenuCommandCallbackSigT, _MenuTypeT]:
...

def __call__(
self, _: _CallbackishT[_AnyCallbackSigT], /
) -> MenuCommand[_AnyCallbackSigT, _MenuTypeT]:
def __call__(self, _: _CallbackishT[_AnyCallbackSigT], /) -> MenuCommand[_AnyCallbackSigT, _MenuTypeT]:
raise NotImplementedError


Expand All @@ -97,9 +95,7 @@ def decorator(callback: _AnyCommandT[_AnyCallbackSigT], /) -> MenuCommand[_AnyCa
def decorator(callback: _MenuCommandCallbackSigT, /) -> MenuCommand[_MenuCommandCallbackSigT, _MenuTypeT]:
...

def decorator(
callback: _CallbackishT[_AnyCallbackSigT], /
) -> MenuCommand[_AnyCallbackSigT, _MenuTypeT]:
def decorator(callback: _CallbackishT[_AnyCallbackSigT], /) -> MenuCommand[_AnyCallbackSigT, _MenuTypeT]:
if isinstance(callback, (tanjun.MenuCommand, tanjun.MessageCommand, tanjun.SlashCommand)):
wrapped_command = callback
callback = callback.callback
Expand Down Expand Up @@ -323,7 +319,7 @@ class MenuCommand(base.PartialCommand[tanjun.MenuContext], tanjun.MenuCommand[_M

@typing.overload
def __init__(
self: MenuCommand[_AnyCallbackSigT,_MenuTypeT],
self: MenuCommand[_AnyCallbackSigT, _MenuTypeT],
callback: _AnyCommandT[
_AnyCallbackSigT,
],
Expand Down Expand Up @@ -358,7 +354,7 @@ def __init__(
...

def __init__(
self: MenuCommand[_AnyCallbackSigT,_MenuTypeT],
self: MenuCommand[_AnyCallbackSigT, _MenuTypeT],
callback: _CallbackishT[_AnyCallbackSigT],
type_: _MenuTypeT,
name: str,
Expand Down

0 comments on commit 014a6ea

Please sign in to comment.