Browse Source

Remove unused methods and unused arguments

dev
Sebastian Lohff 2 years ago
parent
commit
c363c187bd
  1. 10
      clintermission/climenu.py
  2. 1
      examples/multiselect.py

10
clintermission/climenu.py

@ -159,14 +159,6 @@ class CliMenu: @@ -159,14 +159,6 @@ class CliMenu:
def get_selection_item(self):
return self.get_selection()[1]
def cursor(self):
return '{} '.format(self._cursor)
@property
def no_cursor(self):
# cursor with spaces minus dedent
return ' ' * (len(self._cursor) + 1 * self._dedent_selection)
def _transform_prefix(self, item, lineno, prefix):
return prefix
@ -272,7 +264,7 @@ class CliMenu: @@ -272,7 +264,7 @@ class CliMenu:
@self._kb.add('N', filter=~is_searching)
@self._kb.add('n', filter=~is_searching)
def search_inc(event, filter=is_searching):
def search_inc(event):
if not self._bufctrl.search_state.text:
return

1
examples/multiselect.py

@ -12,7 +12,6 @@ q = [ @@ -12,7 +12,6 @@ q = [
m = CliMultiMenu(q, "Make your choice (<space> selects, <return> accepts):\n", cursor=CliMenuCursor.ASCII_ARROW,
unselected_icon="", selected_icon="")
m.get_selection()
print("You selected", m.get_selection())
print("You selected num:", m.get_selection_num())
print("You selected item:", m.get_selection_item())

Loading…
Cancel
Save