Skip to content

Commit 1e81253

Browse files
authored
Merge pull request #207 from zero-sum-seattle/issue#206_fix
Issue#206 fix
2 parents 9059166 + ffc9e78 commit 1e81253

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

mlbstatsapi/models/attendances/attributes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,9 @@ class AttendanceRecords:
116116
gameshometotal: int
117117
year: str
118118
attendanceaverageytd: int
119-
attendancetotal: int
120119
gametype: Union[AttendenceGameType, dict]
121120
team: Union[Team, dict]
121+
attendancetotal: Optional[int] = None
122122
attendanceaverageaway: Optional[int] = None
123123
attendanceaveragehome: Optional[int] = None
124124
attendancehigh: Optional[int] = None

mlbstatsapi/models/game/gamedata/attributes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,9 @@ class GameInfo:
165165
delaydurationminutes : int
166166
The length of delay for the game in minutes
167167
"""
168-
attendance: int
169168
firstpitch: str
170-
gamedurationminutes: int
169+
attendance: Optional[int] = None
170+
gamedurationminutes: Optional[int] = None
171171
delaydurationminutes: Optional[int] = None
172172

173173

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "python-mlb-statsapi"
7-
version = "0.5.17"
7+
version = "0.5.18"
88

99
authors = [
1010
{ name="Matthew Spah", email="spahmatthew@gmail.com" },

tests/external_tests/mlb/test_mlb.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ def test_mlb_get_person_id(self):
9191

9292
def test_mlb_get_person_id_with_sportid(self):
9393
"""mlb get_person_id should return a person id"""
94-
id = self.mlb.get_people_id('Fernando Abad', sport_id=11)
95-
self.assertEqual(id, [472551])
94+
id = self.mlb.get_people_id('Tyler Black', sport_id=11)
95+
self.assertEqual(id, [672012])
9696

9797
def test_mlb_get_invalid_person_id(self):
9898
"""mlb get_person_id should return empty list for invalid name"""

0 commit comments

Comments
 (0)