Passed
Pull Request — main (#228)
by
unknown
02:12
created

member   A

Complexity

Total Complexity 0

Size/Duplication

Total Lines 60
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 0
eloc 28
dl 0
loc 60
rs 10
c 0
b 0
f 0
1
"""
2
The MIT License (MIT)
3
Copyright (c) 2015-present Rapptz
4
Permission is hereby granted, free of charge, to any person obtaining a
5
copy of this software and associated documentation files (the "Software"),
6
to deal in the Software without restriction, including without limitation
7
the rights to use, copy, modify, merge, publish, distribute, sublicense,
8
and/or sell copies of the Software, and to permit persons to whom the
9
Software is furnished to do so, subject to the following conditions:
10
The above copyright notice and this permission notice shall be included in
11
all copies or substantial portions of the Software.
12
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
13
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
17
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
18
DEALINGS IN THE SOFTWARE.
19
"""
20
21
from typing import TypedDict
22
from .snowflake import SnowflakeList
23
from .user import User
24
25
26
class Nickname(TypedDict):
27
    nick: str
28
29
30
class PartialMember(TypedDict):
31
    roles: SnowflakeList
32
    joined_at: str
33
    deaf: str
34
    mute: str
35
36
37
class Member(PartialMember, total=False):
38
    avatar: str
39
    user: User
40
    nick: str
41
    premium_since: str
42
    pending: bool
43
    permissions: str
44
45
46
class _OptionalMemberWithUser(PartialMember, total=False):
47
    avatar: str
48
    nick: str
49
    premium_since: str
50
    pending: bool
51
    permissions: str
52
53
54
class MemberWithUser(_OptionalMemberWithUser):
55
    user: User
56
57
58
class UserWithMember(User, total=False):
59
    member: _OptionalMemberWithUser