-
Notifications
You must be signed in to change notification settings - Fork 0
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
210 Cast counts as ints #211
Conversation
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
) | ||
|
||
return Counts( | ||
single_field_count=single_errors, | ||
multi_field_count=multi_errors, | ||
register_count=register_errors, | ||
total_count=sum([single_errors, multi_errors, register_errors]), | ||
total_count=int(sum([single_errors, multi_errors, register_errors])), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't need to cast here because single_errors, multi_errors and register_errors are already ints. The reason the above cast has to happen is the sum([(~error.check_output).sum()...]) stuff is returning an int64 from sum(). The sum method returns the type provided here you're summing ints, so an int is returned.
), Counts( | ||
single_field_count=single_warnings, | ||
multi_field_count=multi_warnings, | ||
total_count=sum([single_warnings, multi_warnings]), # There are no register-level warnings at this time | ||
total_count=int(sum([single_warnings, multi_warnings])), # There are no register-level warnings at this time |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
Closes #210