]> git.armaanb.net Git - lightcards.git/blobdiff - lightcards/display.py
Clean up enumerates
[lightcards.git] / lightcards / display.py
index ae3534d0a2ab8449f2a8b1d748331cdb4e5716cd..2b4a51fa868a0e6acc388ead17f7c0bd551fe18d 100644 (file)
@@ -50,7 +50,7 @@ class Quit:
         (mlines, mcols) = self.outer.win.getmaxyx()
         self.win.mvwin(int(mlines / 2) - 3, int(mcols / 2) - 10)
         self.panel.show()
-        if self.outer.config["confirm_quit"]:
+        if self.outer.config["quit_confirmation"]:
             while True:
                 key = self.win.getkey()
                 if key == "y":
@@ -108,8 +108,8 @@ class Help(Panel):
         )
         self.win.hline(2, 1, curses.ACS_HLINE, mcols)
 
-        for t in enumerate(text):
-            self.win.addstr(t[0] + 3, 1, t[1])
+        for i, content in enumerate(text, 3):
+            self.win.addstr(i, 1, content)
 
         self.win.box()
 
@@ -156,8 +156,8 @@ class Menu(Panel):
             f"{c('menu_disp')}: close menu",
         ]
 
-        for t in enumerate(text):
-            self.win.addstr(t[0] + 3, 1, t[1])
+        for i, content in enumerate(text, 3):
+            self.win.addstr(i, 1, content)
 
         self.win.box()