Update pyright version

This commit is contained in:
Josh
2023-07-02 08:26:27 +10:00
committed by GitHub
parent 0871b34fc8
commit 630b2a1e55
17 changed files with 45 additions and 27 deletions

View File

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

View File

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

View File

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