mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-10-21 07:53:01 +00:00
Update Pyright to v1.1.394
This commit is contained in:
@@ -903,7 +903,7 @@ class Command(Generic[GroupT, P, T]):
|
||||
predicates = getattr(param.autocomplete, '__discord_app_commands_checks__', [])
|
||||
if predicates:
|
||||
try:
|
||||
passed = await async_all(f(interaction) for f in predicates)
|
||||
passed = await async_all(f(interaction) for f in predicates) # type: ignore
|
||||
except Exception:
|
||||
passed = False
|
||||
|
||||
@@ -1014,7 +1014,7 @@ class Command(Generic[GroupT, P, T]):
|
||||
if not predicates:
|
||||
return True
|
||||
|
||||
return await async_all(f(interaction) for f in predicates)
|
||||
return await async_all(f(interaction) for f in predicates) # type: ignore
|
||||
|
||||
def error(self, coro: Error[GroupT]) -> Error[GroupT]:
|
||||
"""A decorator that registers a coroutine as a local error handler.
|
||||
@@ -1308,7 +1308,7 @@ class ContextMenu:
|
||||
if not predicates:
|
||||
return True
|
||||
|
||||
return await async_all(f(interaction) for f in predicates)
|
||||
return await async_all(f(interaction) for f in predicates) # type: ignore
|
||||
|
||||
def _has_any_error_handlers(self) -> bool:
|
||||
return self.on_error is not None
|
||||
@@ -1842,7 +1842,7 @@ class Group:
|
||||
if len(params) != 2:
|
||||
raise TypeError('The error handler must have 2 parameters.')
|
||||
|
||||
self.on_error = coro
|
||||
self.on_error = coro # type: ignore
|
||||
return coro
|
||||
|
||||
async def interaction_check(self, interaction: Interaction, /) -> bool:
|
||||
|
@@ -235,7 +235,7 @@ class Transformer(Generic[ClientT]):
|
||||
pass
|
||||
|
||||
def __or__(self, rhs: Any) -> Any:
|
||||
return Union[self, rhs] # type: ignore
|
||||
return Union[self, rhs]
|
||||
|
||||
@property
|
||||
def type(self) -> AppCommandOptionType:
|
||||
|
@@ -859,7 +859,7 @@ class CommandTree(Generic[ClientT]):
|
||||
if len(params) != 2:
|
||||
raise TypeError('error handler must have 2 parameters')
|
||||
|
||||
self.on_error = coro
|
||||
self.on_error = coro # type: ignore
|
||||
return coro
|
||||
|
||||
def command(
|
||||
|
Reference in New Issue
Block a user