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.
This commit is contained in:
Hornwitser 2018-06-11 14:41:23 +02:00 committed by Rapptz
parent bf9ca405e3
commit 96baabcaa2

View File

@ -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."""