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 | parser.add_argument('--standings', action='store_true', help='Display the standings') |
15 | parser.add_argument('--standings', action='store_true', help='Display the standings') |
| 16 | args = parser.parse_args() |
16 | args = parser.parse_args() |
| 17 | |
17 | |
| 18 | games, standings = fetch_data.fetch_data() |
18 | games, ranks = fetch_data.fetch_data() |
| 19 | |
19 | |
| 20 | if args.scores: |
20 | if args.scores: |
| 21 | scores.build_scoreboard(games, standings) |
21 | scores.build_scoreboard(games, ranks) |
| 22 | elif args.standings: |
22 | elif args.standings: |
| 23 | standings.build_standings(standings) |
23 | standings.build_standings(ranks) |
| 24 | else: |
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 | games = json.loads(games_json) |
25 | games = json.loads(games_json) |
| 26 | standings = json.loads(standings_json) |
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 | from tabulate import tabulate |
4 | from tabulate import tabulate |
| 5 | |
5 | |
| 6 | # ANSI escape codes for text formatting |
6 | # ANSI escape codes for text formatting |
| |
7 | BOLD = '\033[1m' |
| 7 | END = '\033[0m' |
8 | END = '\033[0m' |
| 8 | RED = '\033[91m' |
9 | RED = '\033[91m' |
| 9 | GREEN = '\033[32m' |
10 | GREEN = '\033[32m' |