From 82c16051dbc9065cb8158e26744074743da585ef Mon Sep 17 00:00:00 2001 From: Felix Pankratz Date: Wed, 30 Aug 2023 16:40:35 +0200 Subject: [PATCH] cleanup --- hn.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hn.py b/hn.py index 059b398..15edb74 100755 --- a/hn.py +++ b/hn.py @@ -32,7 +32,6 @@ class Client: def load_stories(self, from_pos, to_pos): for idx, i in enumerate(self.topstories[from_pos:to_pos]): - #stdscr.clear() self.set_footer(f'[{spinner_states[idx%4]}] Loading { to_pos - from_pos } stories...') self.screen.refresh() self.loadedstories.append(api.get_story(i)) @@ -49,7 +48,7 @@ class Client: self.stories_in_a_site = self.lines - 3 title_string = '[Y] Hacker News' - title_string +=' ' * ( self.cols - len(title_string) - 1) + '\n' + title_string +=' ' * (self.cols - len(title_string) - 1) + '\n' self.screen.addstr(title_string, curses.color_pair(1)) @@ -83,7 +82,7 @@ class Client: page = int(self.story_pos / self.stories_in_a_site + 1) total_pages = math.ceil(len(self.loadedstories)/self.stories_in_a_site) - self.set_footer(f'Page {page}/{total_pages}, loaded {len(self.loadedstories)} stories.') + self.set_footer(f'Page {page}/{total_pages}, loaded {len(self.loadedstories)} stories.') def handle_input(self): c = self.screen.getch()