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

fix: Return empty standings prior to Week 1 #565

Merged
merged 1 commit into from
Sep 9, 2024

Conversation

DesiPilla
Copy link
Contributor

ZeroDivisionError thrown if no games have been completed yet.

Resolves Issue #564

`ZeroDivisionError` thrown if no games have been completed yet
Copy link

codecov bot commented Sep 6, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 84.29%. Comparing base (428d155) to head (cc38058).
Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
espn_api/football/league.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #565      +/-   ##
==========================================
- Coverage   84.32%   84.29%   -0.04%     
==========================================
  Files          60       60              
  Lines        2227     2229       +2     
==========================================
+ Hits         1878     1879       +1     
- Misses        349      350       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@DesiPilla
Copy link
Contributor Author

Not sure how to reliably/accurately test this line of code, as it depends on the currentMatchupPeriod, a constantly changing attribute. In any case, when currentMatchupPeriod <= 1, the returned standings are empty and meaningless anyway.

@cwendt94 cwendt94 merged commit c2bbc7d into cwendt94:master Sep 9, 2024
2 of 3 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