Skip to content

Conversation

@coreylane
Copy link

Summary

Changes Made

  • Added age: Optional[int] = None to SimplePitchingSplit
  • Added caughtstealingpercentage: Optional[str] = None to SimplePitchingSplit
  • Updated docstring to document the new age field

Testing

  • Verified fix works with player ID 641793 (consistently reproduced the issue)
  • No breaking changes to existing functionality
  • All new fields are optional to maintain backward compatibility

Background

The MLB API has added new statistical fields to pitcher data responses. The existing SimplePitchingSplit dataclass was missing these fields, causing crashes when processing current API responses.

🤖 Generated with Claude Code

coreylane and others added 2 commits August 29, 2025 17:42
…Split

Fixes zero-sum-seattle#232

The MLB API now includes 'age' and 'caughtstealingpercentage' fields in pitcher statistics responses.
These fields were missing from the SimplePitchingSplit dataclass, causing TypeError when trying to
initialize the object with API response data.

Changes:
- Added age: Optional[int] = None to SimplePitchingSplit
- Added caughtstealingpercentage: Optional[str] = None to SimplePitchingSplit
- Updated docstring to document the new age field

Tested with player ID 641793 which consistently reproduced the issue.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Updates the SimplePitchingSplit class docstring to include documentation
for the caughtstealingpercentage field that was added in the previous commit.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
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.

1 participant