python-mlb-statsapi icon indicating copy to clipboard operation
python-mlb-statsapi copied to clipboard

Update hitting.py to fix unexpected keyword errors

Open sharmaakhil100 opened this issue 1 year ago • 0 comments

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

sharmaakhil100 avatar Aug 12 '24 22:08 sharmaakhil100