Skip to content

Commit f42a186

Browse files
committed
refactor: migrate people and data models to Pydantic
Models converted: - people/attributes: BatSide, PitchHand, Position, Status, Home, School - people/people: Person, Player, Coach, Batter, Pitcher, DraftPick - data/data: PitchBreak, PitchCoordinates, PitchData, HitCoordinates, HitData, CodeDesc, Violation, Count, PlayDetails Key changes: - All fields use snake_case with aliases for API compatibility - Player uses model_validator to handle position -> primary_position mapping - PlayDetails uses field_validator to convert empty dicts to None - Fixed type mismatches: current_team is Team (not str), launch_angle is float - Updated person tests to use new field names
1 parent 983c271 commit f42a186

5 files changed

Lines changed: 451 additions & 499 deletions

File tree

0 commit comments

Comments
 (0)