diff options
| author | Hornwitser <[email protected]> | 2018-06-11 14:41:23 +0200 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2018-06-21 07:44:00 -0400 |
| commit | 96baabcaa2f5e982d5f9bafdc8a4d1dc11e08687 (patch) | |
| tree | 088ef58de50f0f9d82006fcd36c9b4179d5248cf | |
| parent | Fix case insensitive command removal (diff) | |
| download | discord.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.py | 4 |
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.""" |