Passed
Pull Request — main (#44)
by
unknown
01:34
created

pincer.objects.voice_region   A

Complexity

Total Complexity 0

Size/Duplication

Total Lines 62
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 0
eloc 11
dl 0
loc 62
rs 10
c 0
b 0
f 0
1
# -*- coding: utf-8 -*-
0 ignored issues
show
introduced by
Missing module docstring
Loading history...
2
# MIT License
3
#
4
# Copyright (c) 2021 Pincer
5
#
6
# Permission is hereby granted, free of charge, to any person obtaining
7
# a copy of this software and associated documentation files
8
# (the "Software"), to deal in the Software without restriction,
9
# including without limitation the rights to use, copy, modify, merge,
10
# publish, distribute, sublicense, and/or sell copies of the Software,
11
# and to permit persons to whom the Software is furnished to do so,
12
# subject to the following conditions:
13
#
14
# The above copyright notice and this permission notice shall be
15
# included in all copies or substantial portions of the Software.
16
#
17
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
20
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
21
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
22
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
23
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24
25
from dataclasses import dataclass
26
27
from pincer.utils.api_object import APIObject
28
29
30
@dataclass
31
class VoiceRegion(APIObject):
32
    """
33
    Represents a Discord Voice Region object
34
35
    :param id:
36
        unique ID for the region
37
38
    :param name:
39
        name of the region
40
41
    :param vip:
42
        true if this is a vip-only server
43
44
    :param optimal:
45
        true for a single server
46
        that is closest to the current user's client
47
48
    :param deprecated:
49
        whether this is a deprecated voice region
50
        (avoid switching to these)
51
52
    :param custom:
53
        whether this is a custom voice region
54
        (used for events/etc)
55
    """
56
    id: str
1 ignored issue
show
Coding Style Naming introduced by
Attribute name "id" doesn't conform to snake_case naming style ('([^\\W\\dA-Z][^\\WA-Z]2,|_[^\\WA-Z]*|__[^\\WA-Z\\d_][^\\WA-Z]+__)$' pattern)

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
57
    name: str
58
    vip: bool
59
    optimal: bool
60
    deprecated: bool
61
    custom: bool
62