-
Notifications
You must be signed in to change notification settings - Fork 0
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
Fix: Expand runner/core import errors #29
base: main
Are you sure you want to change the base?
Conversation
@maxim-v4s can you review? |
There was a problem hiding this 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) |
There was a problem hiding this comment.
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.
@@ -39,8 +39,8 @@ | |||
from qualibrate_runner.app import app as runner_app | |||
except ImportError as ex: | |||
raise ImportError( | |||
"Can't import qualibrate_runner instance. " | |||
"Check that you have installed it." | |||
f"Can't import qualibrate_runner instance. " |
There was a problem hiding this comment.
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}"
)
Currently if the import of runner/core fails, the traceback is shown but the actual error isn't shown. This PR fixes that.