python-mlb-statsapi
python-mlb-statsapi copied to clipboard
Update hitting.py to fix unexpected keyword errors
Why
Running this code with 'gameLog', which is a valid stat input was giving an unexpected keyword summary exception:
stats = ['gameLog']
groups = ['hitting']
params = {'season': 2024}
all_game_stats = mlb.get_player_stats(664034, stats, groups, **params)
What
Changes were made to ignore unexpected keywords instead of throwing an error
Tests
Tested with original library code calls and now it is working