statcast_batter() function signature does not match usage, player_id shouldn't be marked optional
- Dominant language
- Python
- Stars
- 1.7k
- Forks
- 428
- PR merge metrics
- No merged PRs in 30d
Description
## The Issue
In particular, the function signature has the `player_id` as an optional argument -- [see here](https://github.com/jldbc/pybaseball/blob/fd6c4e4bb6135604829e46d686f240ee2bd07194/pybaseball/statcast_batter.py#L11)
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()](https://github.com/jldbc/pybaseball/blob/master/pybaseball/statcast_batter.py#L11) from `player_id: Optional[int] = None` to `player_id: int = None`
Contributor guide
Assessment
This issue has not been assessed yet.