team_fielding_bref() can be improved for better parameter formatting and error handling
Open
- Dominant language
- Python
- Stars
- 1.7k
- Forks
- 428
- PR merge metrics
- No merged PRs in 30d
Description
If a user inputs a valid three letter abbreviation for a team when calling team_fielding_bref(), but without all letters capitalized (ex. "oak" or "OaK" instead of "OAK"), it raises the error: `AttributeError: 'NoneType' object has no attribute 'find'`
Additionally, there is error handling if a user does not input a start_season, but no error handling if a user inputs an invalid range (ex. end season before start season).
I would like to propose adding .upper() to the variable, team, and adding error handling for the season parameter range to increase the robustness of this function.
Contributor guide
Assessment
This issue has not been assessed yet.