fixed rpr
This commit is contained in:
parent
c67d8fba61
commit
0a7dfeb5ea
@ -7,7 +7,7 @@ def search_pages():
|
|||||||
print("audio", search.audio_pages)
|
print("audio", search.audio_pages)
|
||||||
|
|
||||||
print()
|
print()
|
||||||
print(search._current_option)
|
print(search)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
@ -40,7 +40,7 @@ class MultiPageOptions:
|
|||||||
lines.append("...")
|
lines.append("...")
|
||||||
break
|
break
|
||||||
|
|
||||||
lines.append(f"{j+i:0{self.option_digits}} {option_obj.option_string}")
|
lines.append(f"{j + i:0{self.option_digits}} {option_obj.option_string}")
|
||||||
|
|
||||||
j += i + 1
|
j += i + 1
|
||||||
|
|
||||||
@ -54,7 +54,7 @@ class MultiPageOptions:
|
|||||||
option_len = self.max_displayed_options
|
option_len = self.max_displayed_options
|
||||||
|
|
||||||
if index < j + option_len:
|
if index < j + option_len:
|
||||||
return options[j+option_len-1]
|
return options[j + option_len - 1]
|
||||||
|
|
||||||
j += option_len - 1
|
j += option_len - 1
|
||||||
|
|
||||||
@ -131,7 +131,6 @@ class Search:
|
|||||||
self._option_history.pop()
|
self._option_history.pop()
|
||||||
return self._option_history[-1]
|
return self._option_history[-1]
|
||||||
|
|
||||||
|
|
||||||
def search(self, query: str):
|
def search(self, query: str):
|
||||||
"""
|
"""
|
||||||
# The Query
|
# The Query
|
||||||
@ -145,4 +144,5 @@ class Search:
|
|||||||
for page in self.pages:
|
for page in self.pages:
|
||||||
self._current_option[page] = page.search_by_query(query=query)
|
self._current_option[page] = page.search_by_query(query=query)
|
||||||
|
|
||||||
|
def __repr__(self):
|
||||||
|
return self._current_option.__repr__()
|
||||||
|
Loading…
Reference in New Issue
Block a user