-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
Support pathlib.Path in write_if_different and import_file #84
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #84 +/- ##
=======================================
Coverage 75.98% 75.98%
=======================================
Files 4 4
Lines 329 329
=======================================
Hits 250 250
Misses 79 79 ☔ View full report in Codecov by Sentry. |
@astrofrog Looks like we both worked on this at the very same time (#85) ! |
@neutrinoceros - we need to keep supporting str input for those functions, hence some of the changes I made here, and I've also been able to simplify a little of the code using read_bytes/write_bytes. I've also updated the docstrings. The tests here also check both str and Path work, so I'd prefer to keep #84 and close #85 if you agree. |
I didn't drop support for |
Sorry I wrote my comment before you pushed some additional changes 😅 - race conditions! |
extension_helpers/_utils.py
Outdated
@@ -77,7 +78,7 @@ def walk_skip_hidden(top, onerror=None, followlinks=False): | |||
yield root, dirs, files | |||
|
|||
|
|||
def write_if_different(filename, data): |
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.
This is the breaking change I was talking about. Can you please revert it ? Beyond that, happy to approve this PR.
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.
Done and pushed
@neutrinoceros - are you happy with this now? |
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.
Absolutely. Thank you !
Replacement for #83 which includes tests