Skip to content

team_fielding_bref() can be improved for better parameter formatting and error handling #462

Open

Description

@ajaviya

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions