Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update MyFantasyLeague for playoff weeks #117

Merged
merged 3 commits into from
Feb 5, 2024

Conversation

Ryandaydev
Copy link
Contributor

@Ryandaydev Ryandaydev commented Feb 1, 2024

Summary:

  • Corrects the situation where a MyFantasyLeague weekly schedule has a single matchup (championship week) by converting the matchup element to a list[] like the other weeks.

  • Corrects the situation where matchups is missing (skipped week) by breaking the week loop. (This might be better if it just skipped the rest of the code and continued to the next week to account for skipped weeks other than the final week.)

Testing
All tests pass 100%
(Didn't create any new tests, sorry.)

Background:
@joeyagreco When I was testing Leeger with MyFantasyLeague I found that it received errors in week 17 (championship) and 18 (skipped) of my league data. That's because the schedule object is a bit different than the rest of the weeks:

Weeks 1-16 - matchup is a list[] of matchups
"schedule": { "weeklySchedule": { "week": "16", "matchup": [ { "franchise": [ {...

Week 17 - matchup is a single matchup element
"schedule": { "weeklySchedule": { "week": "17", "matchup": { "franchise": [... } },

Week 18 - no matchup element for a skipped week
"schedule": { "weeklySchedule": { "week": "18" } },

@joeyagreco
Copy link
Owner

@Ryandaydev could you run a make fmt and push to format please? Thanks

@Ryandaydev
Copy link
Contributor Author

@Ryandaydev could you run a make fmt and push to format please? Thanks

Done!

@joeyagreco joeyagreco merged commit dfe389c into joeyagreco:main Feb 5, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants