pybaseball
pybaseball copied to clipboard
statcast_batter() function signature does not match usage, player_id shouldn't be marked optional
The Issue
In particular, the function signature has the player_id as an optional argument -- see here
In the actual usage of this function, not supplying a player_id raises ValueError: Player ID is required. Note that the docs make it clear that this is a required parameter, just not the actual function signature.
The Fix
Change the function signature in pybaseball/statcast_batter() from player_id: Optional[int] = None to player_id: int = None