Commit 0809a7758f
0809a7758f7e201d10c88d6f95fd86085a57e65d
parent: 8e119140ef
Unregistered key
cmc <hello@cmc.pub> · 2025-03-29 05:31 UTC
fix pylint errors
Layout: unified · split
nba/cli.py
+4 −4
| @@ -15,11 +15,11 @@ def nba() -> None: |
| 15 | 15 | parser.add_argument('--standings', action='store_true', help='Display the standings') |
| 16 | 16 | args = parser.parse_args() |
| 17 | 17 | |
| 18 | | games, standings = fetch_data.fetch_data() |
| 18 | games, ranks = fetch_data.fetch_data() |
| 19 | 19 | |
| 20 | 20 | if args.scores: |
| 21 | | scores.build_scoreboard(games, standings) |
| 21 | scores.build_scoreboard(games, ranks) |
| 22 | 22 | elif args.standings: |
| 23 | | standings.build_standings(standings) |
| 23 | standings.build_standings(ranks) |
| 24 | 24 | else: |
| 25 | | print("Please specify --scores or --standings") |
| \ No newline at end of file |
| 25 | print("Please specify --scores or --standings") |
nba/fetch_data.py
+1 −1
| @@ -25,4 +25,4 @@ def fetch_data() -> tuple: |
| 25 | 25 | games = json.loads(games_json) |
| 26 | 26 | standings = json.loads(standings_json) |
| 27 | 27 | |
| 28 | | return games, standings |
| \ No newline at end of file |
| 28 | return games, standings |
nba/standings.py
+1
| @@ -4,6 +4,7 @@ Tabulate the current conference standings. |
| 4 | 4 | from tabulate import tabulate |
| 5 | 5 | |
| 6 | 6 | # ANSI escape codes for text formatting |
| 7 | BOLD = '\033[1m' |
| 7 | 8 | END = '\033[0m' |
| 8 | 9 | RED = '\033[91m' |
| 9 | 10 | GREEN = '\033[32m' |