logitech_receiver: add has_element to NamedInts

This commit is contained in:
Vinícius 2022-01-21 18:04:49 -03:00 committed by Peter F. Patel-Schneider
parent 49f2c6d8b9
commit c3e88001e4
1 changed files with 3 additions and 0 deletions

View File

@ -228,6 +228,9 @@ class NamedInts:
def __or__(self, other): def __or__(self, other):
return NamedInts(**self.__dict__, **other.__dict__) return NamedInts(**self.__dict__, **other.__dict__)
def has_element(self, value):
return self[value] == value
class UnsortedNamedInts(NamedInts): class UnsortedNamedInts(NamedInts):
def _sort_values(self): def _sort_values(self):