Skip to content

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
@github-actions
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.

2 participants