Skip to content

Commit

Permalink
Small type-hint simplification (#845)
Browse files Browse the repository at this point in the history
  • Loading branch information
FasterSpeeding authored Jan 10, 2024
1 parent 3b77544 commit 25413f2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tanjun/abc.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,7 @@
where dependency injection is supported.
"""

_CheckSig = collections.Callable[typing_extensions.Concatenate[_ContextT_contra, ...], _MaybeAwaitable[bool]]
CheckSig = _CheckSig[_ContextT_contra]
CheckSig = collections.Callable[typing_extensions.Concatenate[_ContextT_contra, ...], _MaybeAwaitable[bool]]
"""Type hint of a generic context check used with Tanjun commands.
This may be registered with a command, client or component to add a rule
Expand All @@ -165,7 +164,7 @@
early and marked as not found.
"""

AnyCheckSig = _CheckSig["Context"]
AnyCheckSig = CheckSig["Context"]
"""Type hint of a check callback for any command type."""

MenuCallbackSig = collections.Callable[typing_extensions.Concatenate["MenuContext", _MenuValueT, ...], _CoroT[None]]
Expand Down

0 comments on commit 25413f2

Please sign in to comment.