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

Use round instead of int in datatypes.py #142

Merged
merged 1 commit into from
Feb 5, 2024
Merged

Use round instead of int in datatypes.py #142

merged 1 commit into from
Feb 5, 2024

Conversation

gerw
Copy link
Collaborator

@gerw gerw commented Oct 9, 2023

int(some_float) always rounds towards zero and this is (maybe) not what is expected.

This PR suggests to replace int() by round().

@github-actions
Copy link

github-actions bot commented Oct 9, 2023

Coverage

Coverage Report
FileStmtsMissCoverMissing
luxtronik
   __init__.py13410621%38–54, 61–66, 69–73, 79, 83, 102–113, 116–119, 122–142, 145–160, 163–180, 183–198, 202–204, 208–209, 213–214
   __main__.py21210%2–48
   datatypes.py2351295%37, 42, 47, 57, 72–75, 80–83, 92
   discover.py433421%25–77
luxtronik/scripts
   dump_changes.py44440%5–93
   dump_luxtronik.py28280%5–64
TOTAL58824558% 

Tests Skipped Failures Errors Time
110 4 💤 0 ❌ 0 🔥 0.998s ⏱️

@Bouni Bouni self-requested a review February 5, 2024 11:47
Copy link
Owner

@Bouni Bouni left a comment

Choose a reason for hiding this comment

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

Lgtm

@Bouni Bouni merged commit 2b962ff into Bouni:main Feb 5, 2024
6 checks passed
@gerw gerw deleted the round branch February 5, 2024 12:09
@Bouni Bouni mentioned this pull request Feb 5, 2024
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