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

pincer.objects.message.attachment   A

Complexity

Total Complexity 0

Size/Duplication

Total Lines 54
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 0
eloc 18
dl 0
loc 54
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, TYPE_CHECKING
8
9
from ...utils.api_object import APIObject
10
from ...utils.types import MISSING
11
12
if TYPE_CHECKING:
13
    from ...utils import APINullable, Snowflake
14
15
16
@dataclass
0 ignored issues
show
best-practice introduced by
Too many instance attributes (8/7)
Loading history...
17
class Attachment(APIObject):
18
    """
19
    Represents a Discord Attachment object
20
21
    :param id:
22
        attachment id
23
24
    :param filename:
25
        name of file attached
26
27
    :param content_type:
28
        the attachment's data type
29
30
    :param size:
31
        size of file in bytes
32
33
    :param url:
34
        source url of file
35
36
    :param proxy_url:
37
        a proxied url of file
38
39
    :param height:
40
        height of file (if image)
41
42
    :param width:
43
        width of file (if image)
44
    """
45
    id: Snowflake
0 ignored issues
show
introduced by
The variable Snowflake does not seem to be defined in case TYPE_CHECKING on line 12 is False. Are you sure this can never be the case?
Loading history...
46
    filename: str
47
    size: int
48
    url: str
49
    proxy_url: str
50
51
    content_type: APINullable[str] = MISSING
0 ignored issues
show
introduced by
The variable APINullable does not seem to be defined in case TYPE_CHECKING on line 12 is False. Are you sure this can never be the case?
Loading history...
52
    height: APINullable[Optional[int]] = MISSING
53
    width: APINullable[Optional[int]] = MISSING
54