-
-
Notifications
You must be signed in to change notification settings - Fork 775
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 typings for addition in eth_sum #5243
Conversation
@thelostone-mc This PR provides a fix to the previous PR. However, this issue doesn't seem to be a problem with the new profiles released. I added the PR regardless in case |
Codecov Report
@@ Coverage Diff @@
## master #5243 +/- ##
==========================================
- Coverage 29.89% 29.89% -0.01%
==========================================
Files 230 230
Lines 18997 18999 +2
Branches 2709 2711 +2
==========================================
Hits 5680 5680
- Misses 13080 13082 +2
Partials 237 237
Continue to review full report at Codecov.
|
@edsonayllon why not use the list comprehension as before? Seems like the right way to go, just some issues with the typing |
@danlipert Both do the same thing. However, having it all on one line resulted in syntax errors when messing with multiple parenthesis, which made debugging a bit frustrating. So for legibility, I expanded the logic. |
@danlipert I returned it to a list comprehension, and reduced the if statement. |
Again failing on production 😞 |
Same error? That would mean
Would need to be changed to:
Or
|
Description
This provides a fix, converting tips to type float before adding to
eth_sum
.eth_sum
did not include tips received by default. When tips were added, they were kept in a type incompatible for addition with a non-emptyeth_sum
. No error was thrown when a profile only had tips or only had completed bounties, but threw an error for profiles with both tips and full bounty rewards. This provides a fix to that error.Refers/Fixes
#5109
#5191
Testing
Most testing was done with
print()
in theeth_sum
function inmodels.py
by loading a page callingeth_sum
while docker was in the foreground. Types were logged withprint()
.eth_sum
was filled with a float variable to test for addition compatibility.