Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug fix for statcast_batter #256

Merged
merged 2 commits into from
Apr 18, 2022
Merged

Bug fix for statcast_batter #256

merged 2 commits into from
Apr 18, 2022

Conversation

akern40
Copy link
Contributor

@akern40 akern40 commented Mar 18, 2022

statcast_batter asserts that its parameters are not None, but does not reassign the parameters after the call to sanitize_input, leading to failure when end_dt is left as None. This commit reassigns the inputs from sanitize_input. player_id is not reassigned to avoid typing errors, since sanitize_input turns it into a string but split_request still expects an integer. Closes #255

`statcast_batter` asserts that its parameters are not `None`, but does not reassign the parameters after the call to `sanitize_input`, leading to failure when `end_dt` is left as `None`. This commit reassigns the inputs from `sanitize_input`. `player_id` is not reassigned to avoid typing errors, since `sanitize_input` turns it into a string but `split_request` still expects an integer.
@schorrm
Copy link
Collaborator

schorrm commented Mar 22, 2022

Looks great, can you add a test case to catch this?

@akern40
Copy link
Contributor Author

akern40 commented Mar 31, 2022

@schorrm just added a commit that tests whether optional start and end dates autofill as expected.

@schorrm schorrm merged commit 0a36598 into jldbc:master Apr 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] statcast_batter must be passed an end datetime
2 participants