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

Cleanup fetch_file_cached() operations in the download model #44

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

Arkay92
Copy link

@Arkay92 Arkay92 commented Dec 27, 2022

Old data was being left behind using os.rename. By switching to shutil we can move the file and delete the old cache data so temp files are properly cleaned up.

@dancergraham
Copy link

Hello,

shutil is part of the standard library so it should not be added to setup.py

@Arkay92
Copy link
Author

Arkay92 commented Dec 28, 2022

My bad good spot graham will undo with a new commit

@dancergraham
Copy link

You're very welcome ! Also on a point of personal preference I would remove code comments which say what the code is doing - that should be clear from the code. I think comments should explain why and the code itself should be clear. For instance the comment below is not needed because the code itself is very clear:

    # Return local path
    return local_path

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.

2 participants