Fix user.py typings and reformat file

This commit is contained in:
Rapptz 2021-08-22 07:37:29 -04:00
parent d17551f51f
commit b8898c7788

View File

@ -49,7 +49,6 @@ __all__ = (
'ClientUser',
)
U = TypeVar('U', bound='User')
BU = TypeVar('BU', bound='BaseUser')
@ -59,7 +58,18 @@ class _UserTag:
class BaseUser(_UserTag):
__slots__ = ('name', 'id', 'discriminator', '_avatar', '_banner', '_accent_colour', 'bot', 'system', '_public_flags', '_state')
__slots__ = (
'name',
'id',
'discriminator',
'_avatar',
'_banner',
'_accent_colour',
'bot',
'system',
'_public_flags',
'_state',
)
if TYPE_CHECKING:
name: str
@ -68,7 +78,7 @@ class BaseUser(_UserTag):
bot: bool
system: bool
_state: ConnectionState
_avatar: str
_avatar: Optional[str]
_banner: Optional[str]
_accent_colour: Optional[str]
_public_flags: int
@ -431,7 +441,7 @@ class User(BaseUser, discord.abc.Messageable):
pass
@classmethod
def _copy(cls: Type[U], user: U) -> U:
def _copy(cls, user: User):
self = super()._copy(user)
self._stored = False
return self