Skip to content

Cleanup the import logic and improve errors#262

Open
fsimonis wants to merge 1 commit into
developfrom
improve-import-errors
Open

Cleanup the import logic and improve errors#262
fsimonis wants to merge 1 commit into
developfrom
improve-import-errors

Conversation

@fsimonis
Copy link
Copy Markdown
Member

This PR cleans up the import logic and improves import error message.

  • The import_module function was used incorrectly. This is now fixed. I am still unsure why it works when passing a file with a .py suffix as it expects a module.
  • The import module step is now a separate step and errors are split into 3 groups:
    • The configured module cannot be found
    • The configured module has dependencies that cannot be found
    • Something else went wrong
  • Then the class is detected with a potential suffix of 0-9
  • Finally the class is wrapped

Checklist:

  • I made sure that the CI passed before I ask for a review.
  • I added a summary of the changes (compared to the last release) in the CHANGELOG.md.
  • If necessary, I made changes to the documentation and/or added new content.
  • I will remember to squash-and-merge, providing a useful summary of the changes of this PR.

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.

1 participant