Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions pybaseball/team_fielding.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,12 @@ def team_fielding_bref(team: str, start_season: int, end_season: Optional[int]=N
)
if end_season is None:
end_season = start_season
if end_season < start_season:
raise ValueError(
"end_season must be greater than or equal to start_season."
)

team = team.upper()
url = "https://www.baseball-reference.com/teams/{}".format(team)

raw_data = []
Expand Down