aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRapptz <[email protected]>2016-10-11 00:57:41 -0400
committerRapptz <[email protected]>2017-01-03 09:51:50 -0500
commite4b16851bf70e98c9f7dc15bb0ac2690073f8f09 (patch)
tree68f713a51f7094edd851b7428c8a6f4b3ad01e48
parentAdd some basic ABCs. (diff)
downloaddiscord.py-e4b16851bf70e98c9f7dc15bb0ac2690073f8f09.tar.xz
discord.py-e4b16851bf70e98c9f7dc15bb0ac2690073f8f09.zip
Slots use tuples instead now.
-rw-r--r--discord/channel.py2
-rw-r--r--discord/colour.py2
-rw-r--r--discord/ext/commands/cooldowns.py2
-rw-r--r--discord/game.py2
-rw-r--r--discord/mixins.py4
-rw-r--r--discord/permissions.py2
-rw-r--r--discord/user.py2
7 files changed, 8 insertions, 8 deletions
diff --git a/discord/channel.py b/discord/channel.py
index 87ce67ef..f79a2d5d 100644
--- a/discord/channel.py
+++ b/discord/channel.py
@@ -353,7 +353,7 @@ class PrivateChannel(Hashable):
:attr:`ChannelType.group` then this is always ``None``.
"""
- __slots__ = ['id', 'recipients', 'type', 'owner', 'icon', 'name', 'me', '_state']
+ __slots__ = ('id', 'recipients', 'type', 'owner', 'icon', 'name', 'me', '_state')
def __init__(self, *, me, state, data):
self._state = state
diff --git a/discord/colour.py b/discord/colour.py
index 76b8bf06..1a4a6183 100644
--- a/discord/colour.py
+++ b/discord/colour.py
@@ -50,7 +50,7 @@ class Colour:
The raw integer colour value.
"""
- __slots__ = [ 'value' ]
+ __slots__ = ('value',)
def __init__(self, value):
self.value = value
diff --git a/discord/ext/commands/cooldowns.py b/discord/ext/commands/cooldowns.py
index c1aa10a7..fb1fe51a 100644
--- a/discord/ext/commands/cooldowns.py
+++ b/discord/ext/commands/cooldowns.py
@@ -35,7 +35,7 @@ class BucketType(enum.Enum):
channel = 3
class Cooldown:
- __slots__ = ['rate', 'per', 'type', '_window', '_tokens', '_last']
+ __slots__ = ('rate', 'per', 'type', '_window', '_tokens', '_last')
def __init__(self, rate, per, type):
self.rate = int(rate)
diff --git a/discord/game.py b/discord/game.py
index 49e5a4fb..2ccabe28 100644
--- a/discord/game.py
+++ b/discord/game.py
@@ -51,7 +51,7 @@ class Game:
The type of game being played. 1 indicates "Streaming".
"""
- __slots__ = ['name', 'type', 'url']
+ __slots__ = ('name', 'type', 'url')
def __init__(self, **kwargs):
self.name = kwargs.get('name')
diff --git a/discord/mixins.py b/discord/mixins.py
index da40d44c..0ed57945 100644
--- a/discord/mixins.py
+++ b/discord/mixins.py
@@ -25,7 +25,7 @@ DEALINGS IN THE SOFTWARE.
"""
class EqualityComparable:
- __slots__ = []
+ __slots__ = ()
def __eq__(self, other):
return isinstance(other, self.__class__) and other.id == self.id
@@ -36,7 +36,7 @@ class EqualityComparable:
return True
class Hashable(EqualityComparable):
- __slots__ = []
+ __slots__ = ()
def __hash__(self):
return hash(self.id)
diff --git a/discord/permissions.py b/discord/permissions.py
index b5b66555..43838a30 100644
--- a/discord/permissions.py
+++ b/discord/permissions.py
@@ -67,7 +67,7 @@ class Permissions:
permissions via the properties rather than using this raw value.
"""
- __slots__ = [ 'value' ]
+ __slots__ = ('value',)
def __init__(self, permissions=0, **kwargs):
self.value = permissions
diff --git a/discord/user.py b/discord/user.py
index fa361837..c14a118e 100644
--- a/discord/user.py
+++ b/discord/user.py
@@ -58,7 +58,7 @@ class User:
Specifies if the user is a bot account.
"""
- __slots__ = ['name', 'id', 'discriminator', 'avatar', 'bot', '_state']
+ __slots__ = ('name', 'id', 'discriminator', 'avatar', 'bot', '_state')
def __init__(self, *, state, data):
self._state = state