Skip to content
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

Add aiofiles.os.renames function #120

Merged
merged 1 commit into from
Jan 3, 2022
Merged

Add aiofiles.os.renames function #120

merged 1 commit into from
Jan 3, 2022

Conversation

jpy-git
Copy link
Contributor

@jpy-git jpy-git commented Jan 2, 2022

The os module in the stdlib provides a function called os.renames that operates in a very similar way to os.rename but will create missing intermediate directories in the new path and delete directories corresponding to rightmost path segments of the old path. This PR adds the async version of that.

Docs: https://docs.python.org/3/library/os.html#os.renames

I've added the relevant unit test in test_os.py

@codecov-commenter
Copy link

codecov-commenter commented Jan 3, 2022

Codecov Report

Merging #120 (ffbcf43) into master (d010ff4) will increase coverage by 0.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #120      +/-   ##
==========================================
+ Coverage   89.59%   89.63%   +0.03%     
==========================================
  Files          10       10              
  Lines         298      299       +1     
==========================================
+ Hits          267      268       +1     
  Misses         31       31              
Impacted Files Coverage Δ
src/aiofiles/os.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d010ff4...ffbcf43. Read the comment docs.

@Tinche
Copy link
Owner

Tinche commented Jan 3, 2022

Great job, thanks!

@Tinche Tinche merged commit 584d5c9 into Tinche:master Jan 3, 2022
@jpy-git jpy-git deleted the aiofiles.os.renames branch January 3, 2022 00:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants