mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-07 10:22:59 +00:00
Update pyright version
This commit is contained in:
@ -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,
|
||||
|
Reference in New Issue
Block a user