Completed
Push — main ( 3a3ea0...93fa25 )
by Yohann
23s queued 12s
created

pincer.objects.message.emoji   A

Complexity

Total Complexity 0

Size/Duplication

Total Lines 57
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 0
eloc 21
dl 0
loc 57
rs 10
c 0
b 0
f 0
1
# Copyright Pincer 2021-Present
0 ignored issues
show
introduced by
Missing module docstring
Loading history...
2
# Full MIT License can be found in `LICENSE` at the project root.
3
4
from __future__ import annotations
5
6
from dataclasses import dataclass
7
from typing import Optional, List, TYPE_CHECKING
8
9
from ...utils.api_object import APIObject
10
from ...utils.snowflake import Snowflake
11
from ...utils.types import MISSING
12
13
if TYPE_CHECKING:
14
    from ..guild.role import Role
15
    from ..user import User
16
    from ...utils import APINullable
17
18
19
@dataclass
0 ignored issues
show
best-practice introduced by
Too many instance attributes (8/7)
Loading history...
20
class Emoji(APIObject):
21
    """
22
    :param id:
23
        emoji id
24
25
    :param name:
26
        emoji name
27
28
    :param animated:
29
        whether this emoji is animated
30
31
    :param available:
32
        whether this emoji can be used, may be false due to loss of Server
33
        Boosts
34
35
    :param managed:
36
        whether this emoji is managed
37
38
    :param require_colons:
39
        whether this emoji must be wrapped in colons
40
41
    :param roles:
42
        roles allowed to use this emoji
43
44
    :param user:
45
        user that created this emoji
46
    """
47
48
    id: Optional[Snowflake]
49
    name: Optional[str]
50
51
    animated: APINullable[bool] = MISSING
0 ignored issues
show
introduced by
The variable APINullable does not seem to be defined in case TYPE_CHECKING on line 13 is False. Are you sure this can never be the case?
Loading history...
52
    available: APINullable[bool] = MISSING
53
    managed: APINullable[bool] = MISSING
54
    require_colons: APINullable[bool] = MISSING
55
    roles: APINullable[List[Role]] = MISSING
0 ignored issues
show
introduced by
The variable Role does not seem to be defined in case TYPE_CHECKING on line 13 is False. Are you sure this can never be the case?
Loading history...
56
    user: APINullable[User] = MISSING
0 ignored issues
show
introduced by
The variable User does not seem to be defined in case TYPE_CHECKING on line 13 is False. Are you sure this can never be the case?
Loading history...
57