mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-10-21 16:03:10 +00:00
Update pyright version
This commit is contained in:
@@ -976,7 +976,7 @@ class Command(Generic[GroupT, P, T]):
|
||||
if self.binding is not None:
|
||||
check: Optional[Check] = getattr(self.binding, 'interaction_check', None)
|
||||
if check:
|
||||
ret = await maybe_coroutine(check, interaction) # type: ignore # Probable pyright bug
|
||||
ret = await maybe_coroutine(check, interaction)
|
||||
if not ret:
|
||||
return False
|
||||
|
||||
|
@@ -177,8 +177,7 @@ class CommandParameter:
|
||||
return choice
|
||||
|
||||
try:
|
||||
# ParamSpec doesn't understand that transform is a callable since it's unbound
|
||||
return await maybe_coroutine(self._annotation.transform, interaction, value) # type: ignore
|
||||
return await maybe_coroutine(self._annotation.transform, interaction, value)
|
||||
except AppCommandError:
|
||||
raise
|
||||
except Exception as e:
|
||||
|
@@ -109,7 +109,7 @@ class TranslationContext(Generic[_L, _D]):
|
||||
def __init__(self, location: Literal[TranslationContextLocation.other], data: Any) -> None:
|
||||
...
|
||||
|
||||
def __init__(self, location: _L, data: _D) -> None:
|
||||
def __init__(self, location: _L, data: _D) -> None: # type: ignore # pyright doesn't like the overloads
|
||||
self.location: _L = location
|
||||
self.data: _D = data
|
||||
|
||||
|
Reference in New Issue
Block a user