mirror of
				https://github.com/Rapptz/discord.py.git
				synced 2025-10-31 05:23:03 +00:00 
			
		
		
		
	Fix partially uknown typing errors
This commit is contained in:
		| @@ -1161,9 +1161,9 @@ class Client: | ||||
|         event: Literal['app_command_completion'], | ||||
|         /, | ||||
|         *, | ||||
|         check: Optional[Callable[[Interaction[Self], Union[Command, ContextMenu]], bool]], | ||||
|         check: Optional[Callable[[Interaction[Self], Union[Command[Any, Any, Any], ContextMenu]], bool]], | ||||
|         timeout: Optional[float] = None, | ||||
|     ) -> Tuple[Interaction[Self], Union[Command, ContextMenu]]: | ||||
|     ) -> Tuple[Interaction[Self], Union[Command[Any, Any, Any], ContextMenu]]: | ||||
|         ... | ||||
|  | ||||
|     # AutoMod | ||||
| @@ -1816,9 +1816,9 @@ class Client: | ||||
|         event: Literal["command", "command_completion"], | ||||
|         /, | ||||
|         *, | ||||
|         check: Optional[Callable[[Context], bool]] = None, | ||||
|         check: Optional[Callable[[Context[Any]], bool]] = None, | ||||
|         timeout: Optional[float] = None, | ||||
|     ) -> Context: | ||||
|     ) -> Context[Any]: | ||||
|         ... | ||||
|  | ||||
|     @overload | ||||
| @@ -1827,9 +1827,9 @@ class Client: | ||||
|         event: Literal["command_error"], | ||||
|         /, | ||||
|         *, | ||||
|         check: Optional[Callable[[Context, CommandError], bool]] = None, | ||||
|         check: Optional[Callable[[Context[Any], CommandError], bool]] = None, | ||||
|         timeout: Optional[float] = None, | ||||
|     ) -> Tuple[Context, CommandError]: | ||||
|     ) -> Tuple[Context[Any], CommandError]: | ||||
|         ... | ||||
|  | ||||
|     @overload | ||||
|   | ||||
| @@ -40,7 +40,7 @@ if TYPE_CHECKING: | ||||
|     from .view import View | ||||
|     from ..components import Component | ||||
|  | ||||
| I = TypeVar('I', bound='Item') | ||||
| I = TypeVar('I', bound='Item[Any]') | ||||
| V = TypeVar('V', bound='View', covariant=True) | ||||
| ItemCallbackType = Callable[[V, Interaction[Any], I], Coroutine[Any, Any, Any]] | ||||
|  | ||||
|   | ||||
| @@ -22,7 +22,7 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||||
| DEALINGS IN THE SOFTWARE. | ||||
| """ | ||||
| from __future__ import annotations | ||||
| from typing import List, Literal, Optional, TYPE_CHECKING, Tuple, Type, TypeVar, Callable, Union, Dict, overload | ||||
| from typing import Any, List, Literal, Optional, TYPE_CHECKING, Tuple, Type, TypeVar, Callable, Union, Dict, overload | ||||
| from contextvars import ContextVar | ||||
| import inspect | ||||
| import os | ||||
| @@ -71,12 +71,12 @@ if TYPE_CHECKING: | ||||
|     ] | ||||
|  | ||||
| V = TypeVar('V', bound='View', covariant=True) | ||||
| BaseSelectT = TypeVar('BaseSelectT', bound='BaseSelect') | ||||
| SelectT = TypeVar('SelectT', bound='Select') | ||||
| UserSelectT = TypeVar('UserSelectT', bound='UserSelect') | ||||
| RoleSelectT = TypeVar('RoleSelectT', bound='RoleSelect') | ||||
| ChannelSelectT = TypeVar('ChannelSelectT', bound='ChannelSelect') | ||||
| MentionableSelectT = TypeVar('MentionableSelectT', bound='MentionableSelect') | ||||
| BaseSelectT = TypeVar('BaseSelectT', bound='BaseSelect[Any]') | ||||
| SelectT = TypeVar('SelectT', bound='Select[Any]') | ||||
| UserSelectT = TypeVar('UserSelectT', bound='UserSelect[Any]') | ||||
| RoleSelectT = TypeVar('RoleSelectT', bound='RoleSelect[Any]') | ||||
| ChannelSelectT = TypeVar('ChannelSelectT', bound='ChannelSelect[Any]') | ||||
| MentionableSelectT = TypeVar('MentionableSelectT', bound='MentionableSelect[Any]') | ||||
| SelectCallbackDecorator: TypeAlias = Callable[[ItemCallbackType[V, BaseSelectT]], BaseSelectT] | ||||
|  | ||||
| selected_values: ContextVar[Dict[str, List[PossibleValue]]] = ContextVar('selected_values') | ||||
|   | ||||
		Reference in New Issue
	
	Block a user