diff options
| author | Christian Cleberg <[email protected]> | 2026-05-04 17:12:26 -0500 |
|---|---|---|
| committer | Christian Cleberg <[email protected]> | 2026-05-04 17:13:16 -0500 |
| commit | 052cd6852c73f5fe4096e1391f9e90c426fb94c6 (patch) | |
| tree | 64ae308a728e8092571a9a3f2c44db4827556428 /build/lib/nba/tui/app.py | |
| parent | 14d8039e4a6ae27c1a7441a375b87617fd5aea4d (diff) | |
| download | nba-scores-052cd6852c73f5fe4096e1391f9e90c426fb94c6.tar.gz nba-scores-052cd6852c73f5fe4096e1391f9e90c426fb94c6.tar.bz2 nba-scores-052cd6852c73f5fe4096e1391f9e90c426fb94c6.zip | |
fix: ruff format & remove unused home_title var
Diffstat (limited to 'build/lib/nba/tui/app.py')
| -rw-r--r-- | build/lib/nba/tui/app.py | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/build/lib/nba/tui/app.py b/build/lib/nba/tui/app.py index cfa72a6..4ade311 100644 --- a/build/lib/nba/tui/app.py +++ b/build/lib/nba/tui/app.py @@ -182,11 +182,15 @@ class NBAApp(App): self.query_one(TabbedContent).active = "boxscore" async def action_prev_category(self) -> None: - self._leaders_cat_idx = (self._leaders_cat_idx - 1) % len(leaders_mod.CATEGORIES) + self._leaders_cat_idx = (self._leaders_cat_idx - 1) % len( + leaders_mod.CATEGORIES + ) await self._refresh_leaders() async def action_next_category(self) -> None: - self._leaders_cat_idx = (self._leaders_cat_idx + 1) % len(leaders_mod.CATEGORIES) + self._leaders_cat_idx = (self._leaders_cat_idx + 1) % len( + leaders_mod.CATEGORIES + ) await self._refresh_leaders() # ------------------------------------------------------------------ # @@ -198,13 +202,17 @@ class NBAApp(App): self.query_one("#leaders-content", Static).update(f"Loading {label} leaders...") loop = asyncio.get_event_loop() try: - data = await loop.run_in_executor(None, lambda: leaders_mod.fetch_leaders(cat)) + data = await loop.run_in_executor( + None, lambda: leaders_mod.fetch_leaders(cat) + ) self._leaders_data = data self.query_one("#leaders-content", Static).update( Text.from_ansi(leaders_mod.get_leaders_table(data, cat)) ) except Exception as exc: - self.query_one("#leaders-content", Static).update(f"Error loading leaders: {exc}") + self.query_one("#leaders-content", Static).update( + f"Error loading leaders: {exc}" + ) async def _load_box_score(self, game_idx: int) -> None: if not self._games: @@ -233,5 +241,7 @@ class NBAApp(App): self.query_one("#home-content", Static).update(Text.from_ansi(home_table)) self.query_one("#away-content", Static).update(Text.from_ansi(away_table)) except Exception as exc: - self.query_one("#home-content", Static).update(f"Error loading box score: {exc}") + self.query_one("#home-content", Static).update( + f"Error loading box score: {exc}" + ) self.query_one("#away-content", Static).update("") |
