Skip to content

Conversation

@nulinspiratie
Copy link
Contributor

Currently if the import of runner/core fails, the traceback is shown but the actual error isn't shown. This PR fixes that.

@nulinspiratie nulinspiratie self-assigned this Jan 7, 2025
@nulinspiratie
Copy link
Contributor Author

@maxim-v4s can you review?

Copy link
Collaborator

@maxim-v4s maxim-v4s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just note: It's a little strange that CI wasn't triggered.

In my POV it's a redundant to show original error. raise from contains all info about issue cause. If you think that really needed to have this then it's needed to fix next 2 comments.

uvicorn.run(
"qualibrate_composite.app:app", port=port, host=host, reload=reload
)
uvicorn.run("qualibrate_composite.app:app", port=port, host=host, reload=reload)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line too long.
80 symbols max with leading padding spaces.

raise ImportError(
"Can't import qualibrate_runner instance. "
"Check that you have installed it."
f"Can't import qualibrate_runner instance. "
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

f should be used only before strings with templates.
So correct:

raise ImportError(
    "Can't import qualibrate_runner instance. "
    f"Check that you have installed it. Original error: {ex}"
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants