Various small fixes#53
Conversation
Without deleting the object the file stays locked preventing the removal of the temporary folder
|
Okay, seems like 1494afd causes the test failure. Though I am not entirely sure why. I am pretty certain the commit is correct. Should I just drop it for now? Edit: I adjusted the get_fingerprint() function. I believe all tests should pass now. Though if you would rather I drop both commits, I can do that to. |
Codecov ReportBase: 97.34% // Head: 97.35% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #53 +/- ##
==========================================
+ Coverage 97.34% 97.35% +0.01%
==========================================
Files 6 6
Lines 602 605 +3
==========================================
+ Hits 586 589 +3
Misses 16 16
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
fabiocaccamo
left a comment
There was a problem hiding this comment.
Thank you very much for this great PR, just that range object optimization and I merge it.
fontbro/font.py
Outdated
| for code, char_name in cmap.items(): | ||
| code_hex = f"{code:04X}" | ||
| char = chr(code) | ||
| if code in range(0x110000): |
There was a problem hiding this comment.
a code_range variable could be created outside the loop to avoid range object creation at every loop iteration.
There was a problem hiding this comment.
I changed it to if 0 <= code < 0x110000: which should be cleaner.
Describe your changes
Various small changes and fixes, the commit messages should be pretty descriptive.
Related issue
Closes #50, Closes #51, Closes #52
I added the option to pass through all kwargs instead of just lazy. This partially addresses #49 through the
fontNumberoption. I think the issue should probably stay open though, since I feel like a nicer interface to interact with collections is still needed.Checklist before requesting a review
test_get_fingerprint_diff_between_variable_instancesandtest_strfail,but they also fail on main for me. Onlytest_strfails in main for me.)