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

Fix error when casting blank literal score as int for ongoing game #128

Merged
merged 2 commits into from May 16, 2019
Merged

Fix error when casting blank literal score as int for ongoing game #128

merged 2 commits into from May 16, 2019

Conversation

AndrewYinLi
Copy link
Contributor

@AndrewYinLi AndrewYinLi commented May 15, 2019

I fixed the error in which I could not call box_score() during the top of an inning for an ongoing game. box_score() would result in throwing an error because __init__ did not account for the score string for the top of an inning being a blank literal i.e. '' and would attempt to cast '' as an int. I also got rid of the try and except because it felt hacky and instead I check to see whether the score string returns true when isdigit() is called before deciding whether or not to cast the score string as an int.

Related issue that I opened: #127

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.

None yet

2 participants