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

Shorten import check #17

Merged
merged 2 commits into from
Dec 2, 2024
Merged

Shorten import check #17

merged 2 commits into from
Dec 2, 2024

Conversation

RyanLua
Copy link
Owner

@RyanLua RyanLua commented Dec 2, 2024

Description

Shortens the code used to check whether a module is installed or not. The behavior should remain the exact same but just refactored to be shorter in the source code.

Related Issues

Changes Made

Instead of multiple try statements, we put it all in one statement and use ModuleNotFoundError.name to see which ones aren't installed/findable.

Checklist

  • I have tested these changes thoroughly.
  • I have reviewed my code for any potential errors or issues.
  • I have followed the code style guidelines for this project.

Additional Notes

@RyanLua RyanLua added the python Pull requests that update Python code label Dec 2, 2024
@RyanLua RyanLua self-assigned this Dec 2, 2024
Copy link

github-actions bot commented Dec 2, 2024

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Files

@RyanLua RyanLua added this to the v0.1.4 milestone Dec 2, 2024
@RyanLua RyanLua merged commit 7a670e6 into main Dec 2, 2024
8 checks passed
@RyanLua RyanLua deleted the simplify-imports branch December 2, 2024 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
python Pull requests that update Python code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant