Update pyright version

This commit is contained in:
Josh
2024-02-21 05:36:02 +11:00
committed by GitHub
parent 76666fbcf4
commit 4e03b170ef
17 changed files with 39 additions and 35 deletions

View File

@ -69,7 +69,7 @@ __all__ = (
)
if TYPE_CHECKING:
from typing_extensions import TypeAlias, Self, TypeGuard
from typing_extensions import TypeAlias, TypeGuard
from .view import View
from ..types.components import SelectMenu as SelectMenuPayload
@ -342,7 +342,7 @@ class BaseSelect(Item[V]):
return True
@classmethod
def from_component(cls, component: SelectMenu) -> Self:
def from_component(cls, component: SelectMenu) -> BaseSelect[V]:
type_to_cls: Dict[ComponentType, Type[BaseSelect[Any]]] = {
ComponentType.string_select: Select,
ComponentType.user_select: UserSelect,
@ -887,7 +887,7 @@ class ChannelSelect(BaseSelect[V]):
@overload
def select(
*,
cls: Type[SelectT] = Select[V],
cls: Type[SelectT] = Select[Any],
options: List[SelectOption] = MISSING,
channel_types: List[ChannelType] = ...,
placeholder: Optional[str] = ...,
@ -903,7 +903,7 @@ def select(
@overload
def select(
*,
cls: Type[UserSelectT] = UserSelect[V],
cls: Type[UserSelectT] = UserSelect[Any],
options: List[SelectOption] = MISSING,
channel_types: List[ChannelType] = ...,
placeholder: Optional[str] = ...,
@ -920,7 +920,7 @@ def select(
@overload
def select(
*,
cls: Type[RoleSelectT] = RoleSelect[V],
cls: Type[RoleSelectT] = RoleSelect[Any],
options: List[SelectOption] = MISSING,
channel_types: List[ChannelType] = ...,
placeholder: Optional[str] = ...,
@ -937,7 +937,7 @@ def select(
@overload
def select(
*,
cls: Type[ChannelSelectT] = ChannelSelect[V],
cls: Type[ChannelSelectT] = ChannelSelect[Any],
options: List[SelectOption] = MISSING,
channel_types: List[ChannelType] = ...,
placeholder: Optional[str] = ...,
@ -954,7 +954,7 @@ def select(
@overload
def select(
*,
cls: Type[MentionableSelectT] = MentionableSelect[V],
cls: Type[MentionableSelectT] = MentionableSelect[Any],
options: List[SelectOption] = MISSING,
channel_types: List[ChannelType] = MISSING,
placeholder: Optional[str] = ...,
@ -970,7 +970,7 @@ def select(
def select(
*,
cls: Type[BaseSelectT] = Select[V],
cls: Type[BaseSelectT] = Select[Any],
options: List[SelectOption] = MISSING,
channel_types: List[ChannelType] = MISSING,
placeholder: Optional[str] = None,