Removed useless methods
This commit is contained in:
parent
efdd24a698
commit
93daaa1a2c
23
aliasmenu.py
23
aliasmenu.py
@ -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):
|
||||
"""
|
||||
|
Loading…
x
Reference in New Issue
Block a user