Skip to content

Fix ImportErrors not being raised #150

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

Merged
merged 3 commits into from
May 21, 2024
Merged

Fix ImportErrors not being raised #150

merged 3 commits into from
May 21, 2024

Conversation

lmmentel
Copy link
Owner

@lmmentel lmmentel commented May 13, 2024

fixes #149

This should ideally work for the following cases:

  1. ✔️ lazy import of elements by symbol
from mendeleev import C
  1. ✔️ import any existing module directly from mendeleev
from mendeleev import fetch
  1. ✔️ raise an exception for non-existing objects
from mendeleev import whatever
ImportError: cannot import name 'whatever' from 'mendeleev' ...

@lmmentel lmmentel requested review from paulromano and kalvdans May 13, 2024 21:45
@lmmentel lmmentel marked this pull request as ready for review May 18, 2024 12:17
@kalvdans
Copy link
Collaborator

Tests looks good. Also test from mendeleev import C please!

@lmmentel lmmentel merged commit 76460b6 into master May 21, 2024
20 checks passed
@lmmentel lmmentel deleted the bugfix/no-importerror branch May 21, 2024 13:14
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.

ImportErrors are not thrown for missing objects
2 participants