Closed keitherskine closed 2 years ago
❌ Merging this PR will decrease code quality in the affected files by 0.16%.
Quality metrics | Before | After | Change |
---|---|---|---|
Complexity | 3.18 ⭐ | 3.18 ⭐ | 0.00 |
Method Length | 48.00 ⭐ | 48.67 ⭐ | 0.67 👎 |
Working memory | 6.91 🙂 | 6.91 🙂 | 0.00 |
Quality | 76.23% ⭐ | 76.07% ⭐ | -0.16% 👎 |
Other metrics | Before | After | Change |
---|---|---|---|
Lines | 23 | 23 | 0 |
Changed files | Quality Before | Quality After | Quality Change |
---|---|---|---|
pyxlsb/init.py | 76.23% ⭐ | 76.07% ⭐ | -0.16% 👎 |
Here are some functions in these files that still need a tune-up:
File | Function | Complexity | Length | Working Memory | Quality | Recommendation |
---|
The emojis denote the absolute quality of the code:
The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request.
Please see our documentation here for details on how these metrics are calculated.
We are actively working on this report - lots more documentation and extra metrics to come!
Help us improve this quality report!
Good catch, round
is indeed much better for the job. Thanks for the fix!
First off, many thanks for creating this package @willtrnr . It's greatly appreciated.
This PR should address an issue I found when converting datetime values from the floats in an .xlsb spreadsheet. The date in question was July 4 2020 at 10:00:00. In Excel, this is stored as the floating point number 44016.416666666664. However, when
convert_date()
is used to retrieve the datetime, something unexpected happened:In
convert_seconds()
the seconds values are cast to integers withint
. This truncates the seconds, whereasround
will I believe return a better, more correct value:Hence, this PR changes the
int
toround
so the nearest seconds value is returned, not the lower one.