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 ensure_ext #141

Merged
merged 3 commits into from
Dec 20, 2024
Merged

Refactor ensure_ext #141

merged 3 commits into from
Dec 20, 2024

Conversation

Pennycook
Copy link
Contributor

Related issues

Part of #36 and #58.

Proposed changes

  • Refactor ensure_ext to use pathlib.
  • Raise errors directly from ensure_ext, so we can't forget to check its return value.
  • Add missing docstrings and tests.

- Add missing docstrings.
- Raise exceptions directly instead of returning bool.
- Use pathlib to handle corner cases like ".tar.gz".

Signed-off-by: John Pennycook <[email protected]>
Signed-off-by: John Pennycook <[email protected]>
@Pennycook Pennycook added the refactor Improvements to code structure label Dec 16, 2024
@Pennycook Pennycook added this to the 2.0.0 milestone Dec 16, 2024
@Pennycook Pennycook merged commit 57f624a into intel:main Dec 20, 2024
3 checks passed
@Pennycook Pennycook deleted the ensure_ext branch December 20, 2024 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Improvements to code structure
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants