Update Pyright to v1.1.394

This commit is contained in:
Rapptz
2025-02-18 03:16:51 -05:00
parent 1cdf710908
commit 8953938a53
30 changed files with 94 additions and 81 deletions

View File

@@ -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:

View File

@@ -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:

View File

@@ -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(