Skip to content

Commit

Permalink
refactor: remove unnecessary loop
Browse files Browse the repository at this point in the history
  • Loading branch information
mecaneer23 committed Apr 30, 2024
1 parent 83ff07b commit 4fbb38d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/menus.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,12 @@ def help_menu(parent_win: curses.window) -> None:
"""Show a scrollable help menu, generated from the README"""
parent_win.clear()
set_header(parent_win, "Help (k/j to scroll):")
lines: list[str] = []
for line in md_table_to_lines(
lines = md_table_to_lines(
CONTROLS_BEGIN_INDEX,
CONTROLS_END_INDEX,
str(HELP_FILE),
frozenset({"<kbd>", "</kbd>", "(arranged alphabetically)"}),
):
lines.append(line[:-2])
)
win = curses.newwin(
min(parent_win.getmaxyx()[0] - 1, len(lines) + 2),
len(lines[0]) + 2,
Expand Down

0 comments on commit 4fbb38d

Please sign in to comment.