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

refactor: remove default in delete_existing_files() #64

Merged
merged 2 commits into from
Jan 3, 2024

Conversation

jameslamb
Copy link
Member

delete_existing_files() is used to clean up previous work done by dependency-file-generator.

This PR proposes removing the default path that function uses when looking for files to delete.

How is this safe?

That function is only used in one place, and a value is explicitly passed in that place.

git grep delete_existing_files

Benefits of this change

Makes the flow of configuration stricter, reduces the risk of "forgot to pass through this configuration and silently fell back to a default" types of bugs.

Notes for Reviewers

This isn't in response to any particular issue.

I'm just reading through the library to understand it better, and noticed this.

Copy link

@msarahan msarahan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At some point it might be nice to use pathlib instead of str, but that's much larger scope than this. This is a good improvement for now.

@ajschmidt8 ajschmidt8 merged commit f02ce83 into rapidsai:main Jan 3, 2024
3 checks passed
@jameslamb jameslamb deleted the no-defaults branch January 3, 2024 18:07
@GPUtester
Copy link

🎉 This PR is included in version 1.9.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants