cwendt94 / espn-api

ESPN Fantasy API! (Football, Basketball)
MIT License
544 stars 183 forks source link

Adding type annotation for the scoreboard method #467

Closed spkane31 closed 9 months ago

spkane31 commented 9 months ago

This PR adds a Team type annotation for the Matchup class. Currently, the id is written (as an int) and then in a loop it is dynamically changed to a Team. I made a change to store the id in a separate variable _{home,away}_team_id and then uses that variable in the loop to set the team. I noticed this 'issue' while working in VS Code and the type annotation wasn't populating, this should make for a slightly improved developer experience

spkane31 commented 9 months ago

I tested this locally to confirm it does not contain any breaking changes to functionality, only adding a new member variable

codecov-commenter commented 9 months ago

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.01% :warning:

Comparison is base (81f8967) 80.36% compared to head (81d853a) 80.36%. Report is 13 commits behind head on master.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #467 +/- ## ========================================== - Coverage 80.36% 80.36% -0.01% ========================================== Files 60 60 Lines 2109 2114 +5 ========================================== + Hits 1695 1699 +4 - Misses 414 415 +1 ``` | [Files Changed](https://app.codecov.io/gh/cwendt94/espn-api/pull/467?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Christian+Wendt) | Coverage Δ | | |---|---|---| | [espn\_api/football/league.py](https://app.codecov.io/gh/cwendt94/espn-api/pull/467?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Christian+Wendt#diff-ZXNwbl9hcGkvZm9vdGJhbGwvbGVhZ3VlLnB5) | `94.52% <100.00%> (ø)` | | | [espn\_api/football/matchup.py](https://app.codecov.io/gh/cwendt94/espn-api/pull/467?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Christian+Wendt#diff-ZXNwbl9hcGkvZm9vdGJhbGwvbWF0Y2h1cC5weQ==) | `94.11% <100.00%> (+1.26%)` | :arrow_up: | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/cwendt94/espn-api/pull/467/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Christian+Wendt)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

cwendt94 commented 9 months ago

Looks good, thanks for adding this!