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

Allow path objects for data-files #271

Merged
merged 8 commits into from
Jul 19, 2024
Merged

Allow path objects for data-files #271

merged 8 commits into from
Jul 19, 2024

Conversation

jaraco
Copy link
Member

@jaraco jaraco commented Jul 19, 2024

@@ -56,6 +57,16 @@ def run(self):
)
(out, _) = self.copy_file(f, self.install_dir)
self.outfiles.append(out)
elif isinstance(f, Path):
Copy link
Member Author

Choose a reason for hiding this comment

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

This covers the case that one of the data files is a simple pathlib.Path, but it doesn't cover the case if a pathlib.Path is used in a tuple (in the else block below).

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah you are right. Should I fix it or do you want to fix it?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm on it. But thanks for offering.

Copy link
Member Author

Choose a reason for hiding this comment

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

My thinking is that convert_path already wraps all the places where a Path might be encountered, so probably that should be expanded to account for pathlib.Path.

@jaraco jaraco marked this pull request as ready for review July 19, 2024 20:15
@jaraco jaraco merged commit 0fa94ff into main Jul 19, 2024
30 of 36 checks passed
@jaraco jaraco deleted the feature/pathlib-data-files branch July 19, 2024 20:15
@jaraco jaraco restored the feature/pathlib-data-files branch July 19, 2024 20:33
@jaraco
Copy link
Member Author

jaraco commented Jul 19, 2024

Looks like I jumped the gun on the merge. I've backed out the merge and going to re-submit (#272).

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