mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-07 10:22:59 +00:00
Use typing.Self throughout library
This commit is contained in:
@ -24,10 +24,14 @@ DEALINGS IN THE SOFTWARE.
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any, Callable, ClassVar, Dict, Generic, Iterator, List, Optional, Tuple, Type, TypeVar, overload
|
||||
from typing import TYPE_CHECKING, Any, Callable, ClassVar, Dict, Iterator, List, Optional, Tuple, Type, TypeVar, overload
|
||||
|
||||
from .enums import UserFlags
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from typing_extensions import Self
|
||||
|
||||
|
||||
__all__ = (
|
||||
'SystemChannelFlags',
|
||||
'MessageFlags',
|
||||
@ -37,7 +41,6 @@ __all__ = (
|
||||
'ApplicationFlags',
|
||||
)
|
||||
|
||||
FV = TypeVar('FV', bound='flag_value')
|
||||
BF = TypeVar('BF', bound='BaseFlags')
|
||||
|
||||
|
||||
@ -47,7 +50,7 @@ class flag_value:
|
||||
self.__doc__ = func.__doc__
|
||||
|
||||
@overload
|
||||
def __get__(self: FV, instance: None, owner: Type[BF]) -> FV:
|
||||
def __get__(self, instance: None, owner: Type[BF]) -> Self:
|
||||
...
|
||||
|
||||
@overload
|
||||
|
Reference in New Issue
Block a user