Skip to content

Commit

Permalink
feat(stats): add pickoffattempts to SimpleCatchingSplit model
Browse files Browse the repository at this point in the history
- Added `pickoffattempts` as an optional attribute in the `SimpleCatchingSplit` model to enhance coverage of catching statistics.
- Updated team name assertion in `TestTeam` to ensure consistency with API responses.
  • Loading branch information
mspah-dp committed Nov 15, 2024
1 parent e549ba4 commit 60afdaa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions mlbstatsapi/models/stats/catching.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ class SimpleCatchingSplit:
sacbunts: Optional[int] = None
sacflies: Optional[int] = None
passedball: Optional[int] = None
pickoffattempts: Optional[int] = None

def __repr__(self) -> str:
kws = [f'{key}={value}' for key, value in self.__dict__.items() if value is not None]
Expand Down
2 changes: 1 addition & 1 deletion tests/external_tests/team/test_team.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def test_team_instance_id_instance_success(self):
# Team object should have attrs set
self.assertEqual(self.team.id, 133)
self.assertIsInstance(self.team, Team)
self.assertEqual(self.team.name, "Oakland Athletics")
self.assertEqual(self.team.name, "Athletics")
self.assertEqual(self.team.link, "/api/v1/teams/133")
self.assertIsInstance(self.team.sport, Sport)
self.assertIsInstance(self.team.venue, Venue)
Expand Down

0 comments on commit 60afdaa

Please sign in to comment.