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

210 Cast counts as ints #211

Merged
merged 2 commits into from
Jun 12, 2024
Merged

210 Cast counts as ints #211

merged 2 commits into from
Jun 12, 2024

Conversation

guffee23
Copy link
Contributor

Closes #210

Copy link

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  src/regtech_data_validator
  create_schemas.py
Project Total  

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])),
Copy link
Contributor

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

@jcadam14 jcadam14 merged commit 9499659 into main Jun 12, 2024
6 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.

Cast counts to int
2 participants