Removed useless methods

This commit is contained in:
justine 2025-01-02 12:55:51 +01:00
parent efdd24a698
commit 93daaa1a2c

View File

@ -21,29 +21,6 @@ class Bindings:
for i, (name, command) in enumerate(bindings_dict.items()):
self.bindings[int(i)] = (name, command)
def get_name(self, index):
"""
Get the name associated with a given index.
:param index: The index of the binding to retrieve.
:return: The name associated with the given index.
:raises IndexError: If the index is out of range.
"""
if not (0 <= index < len(self.bindings)):
raise IndexError("Index out of range")
return self.bindings[index][0]
def get_command(self, index):
"""
Get the command associated with a given index.
:param index: The index of the binding to retrieve.
:return: The command associated with the given index.
:raises IndexError: If the index is out of range.
"""
if not (0 <= index < len(self.bindings)):
raise IndexError("Index out of range")
return self.bindings[index][1]
def __len__(self):
"""