willtrnr / pyxlsb

Excel 2007+ Binary Workbook (xlsb) reader for Python
GNU Lesser General Public License v3.0
90 stars 21 forks source link

fix lines resulting in string-bytes comparison error #44

Closed ftaebi closed 2 years ago

ftaebi commented 2 years ago

Using python 3.8.3 I got an exception: "BytesWarning: Comparison between bytes and string", which is fixed by comparing with an empty bytestring instead of a normal empty string.

sourcery-ai[bot] commented 2 years ago

Sourcery Code Quality Report

✅  Merging this PR will increase code quality in the affected files by 0.03%.

Quality metrics Before After Change
Complexity 2.81 ⭐ 2.81 ⭐ 0.00
Method Length 31.04 ⭐ 30.92 ⭐ -0.12 👍
Working memory 5.50 ⭐ 5.50 ⭐ 0.00
Quality 84.18% 84.21% 0.03% 👍
Other metrics Before After Change
Lines 124 124 0
Changed files Quality Before Quality After Quality Change
pyxlsb/reader.py 84.18% ⭐ 84.21% ⭐ 0.03% 👍

Here are some functions in these files that still need a tune-up:

File Function Complexity Length Working Memory Quality Recommendation
pyxlsb/reader.py BIFF12Reader.next 9 🙂 113 🙂 11 😞 56.59% 🙂 Extract out complex expressions

Legend and Explanation

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!

willtrnr commented 2 years ago

Thanks for that, I'll try to cut a patch release soon