-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much for this great PR, just that range object optimization and I merge it.
fontbro/font.py
Outdated
@@ -271,17 +271,17 @@ def get_characters(self, ignore_blank=False): | |||
glyfs = font.get("glyf") | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
fontNumber
option. 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_instances
andtest_str
fail,but they also fail on main for me. Onlytest_str
fails in main for me.)