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/standings.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/standings.py')
| -rw-r--r-- | build/lib/nba/standings.py | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/build/lib/nba/standings.py b/build/lib/nba/standings.py index 3abb1c0..e71dc2b 100644 --- a/build/lib/nba/standings.py +++ b/build/lib/nba/standings.py @@ -27,7 +27,9 @@ def _build_conference_table(standings, conference: str) -> str: streak = team[35] strk_color = ( - f"{RED}{streak}{END}" if int(streak) < 0 else f"{GREEN}{streak}{END}" + f"{RED}{streak}{END}" + if int(streak) < 0 + else f"{GREEN}{streak}{END}" ) data.append( @@ -47,9 +49,8 @@ def _build_conference_table(standings, conference: str) -> str: headers = ["Rank", "Team", "W-L", "PCT", "GB", "STRK", "L10", "HOME", "AWAY"] label = "Eastern" if conference == "East" else "Western" - return ( - f"{BOLD}{label} Conference Standings:{END}\n" - + tabulate(data, headers=headers, tablefmt="grid") + return f"{BOLD}{label} Conference Standings:{END}\n" + tabulate( + data, headers=headers, tablefmt="grid" ) @@ -73,7 +74,11 @@ def get_standings_tables(standings) -> str: Returns: str: Formatted standings string with ANSI color codes for both conferences. """ - return get_east_standings_table(standings) + "\n\n" + get_west_standings_table(standings) + return ( + get_east_standings_table(standings) + + "\n\n" + + get_west_standings_table(standings) + ) def build_standings(standings) -> None: |
