diff options
author | Christian Cleberg <hello@cleberg.net> | 2025-04-05 13:50:08 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-05 13:50:08 -0500 |
commit | fc0ea096722178bd609bce168d194c926d411a38 (patch) | |
tree | 1a587e9dcc7c2718731c20e4b667c7c9ca913369 /nba/cli.py | |
parent | 4d82554601ad5aba75accd4917bbad1969892203 (diff) | |
download | nba-scores-fc0ea096722178bd609bce168d194c926d411a38.tar.gz nba-scores-fc0ea096722178bd609bce168d194c926d411a38.tar.bz2 nba-scores-fc0ea096722178bd609bce168d194c926d411a38.zip |
migrate from pylint to ruff (#3)
* migrate from pylint to ruff
* Commit from GitHub Actions (Ruff)
---------
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'nba/cli.py')
-rw-r--r-- | nba/cli.py | 32 |
1 files changed, 18 insertions, 14 deletions
@@ -3,23 +3,27 @@ This script uses argparse to parse command line arguments. It imports the required modules and sets up a parser with basic options for demonstration purposes. """ + import argparse from nba import fetch_data, scores, standings + def nba() -> None: - """ - Parse command-line arguments and display either scoreboard or standings. - """ - parser = argparse.ArgumentParser(description="NBA Scoreboard and Standings") - parser.add_argument('--scores', '-sc', action='store_true', help='Display the scoreboard') - parser.add_argument('--standings', '-st', action='store_true', help='Display the standings') - args = parser.parse_args() + """ + Parse command-line arguments and display either scoreboard or standings. + """ + parser = argparse.ArgumentParser(description="NBA Scoreboard and Standings") + parser.add_argument("--scores", action="store_true", help="Display the scoreboard") + parser.add_argument( + "--standings", action="store_true", help="Display the standings" + ) + args = parser.parse_args() - games, ranks = fetch_data.fetch_data() + games, ranks = fetch_data.fetch_data() - if args.scores: - scores.build_scoreboard(games, ranks) - elif args.standings: - standings.build_standings(ranks) - else: - print("Please specify --scores or --standings") + if args.scores: + scores.build_scoreboard(games, ranks) + elif args.standings: + standings.build_standings(ranks) + else: + print("Please specify --scores or --standings") |