aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHornwitser <[email protected]>2018-06-11 14:41:23 +0200
committerRapptz <[email protected]>2018-06-21 07:44:00 -0400
commit96baabcaa2f5e982d5f9bafdc8a4d1dc11e08687 (patch)
tree088ef58de50f0f9d82006fcd36c9b4179d5248cf
parentFix case insensitive command removal (diff)
downloaddiscord.py-96baabcaa2f5e982d5f9bafdc8a4d1dc11e08687.tar.xz
discord.py-96baabcaa2f5e982d5f9bafdc8a4d1dc11e08687.zip
Fix typo in Permissions.is_subset/is_superset
Fix the name for the other's type when raising TypeError being incorrectly written as __class__name instead of __class__.__name__ in the is_subset and is_superset methods of the Permissions class. This was introduced at the creation of these methods in 21c88cf.
-rw-r--r--discord/permissions.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/discord/permissions.py b/discord/permissions.py
index f72f27f5..eaa06706 100644
--- a/discord/permissions.py
+++ b/discord/permissions.py
@@ -101,14 +101,14 @@ class Permissions:
if isinstance(other, Permissions):
return (self.value & other.value) == self.value
else:
- raise TypeError("cannot compare {} with {}".format(self.__class__.__name__, other.__class__name))
+ raise TypeError("cannot compare {} with {}".format(self.__class__.__name__, other.__class__.__name__))
def is_superset(self, other):
"""Returns True if self has the same or more permissions as other."""
if isinstance(other, Permissions):
return (self.value | other.value) == self.value
else:
- raise TypeError("cannot compare {} with {}".format(self.__class__.__name__, other.__class__name))
+ raise TypeError("cannot compare {} with {}".format(self.__class__.__name__, other.__class__.__name__))
def is_strict_subset(self, other):
"""Returns True if the permissions on other are a strict subset of those on self."""