Skip to content
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

Improve error message if qt binding could not be found #205

Merged
merged 7 commits into from
Oct 2, 2023

Conversation

timonmerk
Copy link
Contributor

Related to #199, this PR checks before the first qtpy import if the QtBindingsNotFoundError exception is thrown. The error message now hints that pyqt5 needs to be installed.

Comment on lines 26 to 35
from qtpy.QtCore import (
QEvent,
QThread,
Qt,
Signal,
QRectF,
QLineF,
QPointF,
QPoint,
QSettings,
Copy link
Member

Choose a reason for hiding this comment

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

I would also just nest one of these imports, then the rest can be as they were before. It'll make the diff smaller as well

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the comments @larsoner

Copy link
Member

@larsoner larsoner left a comment

Choose a reason for hiding this comment

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

Marking for merge when green, thanks in advance @timonmerk !

@larsoner larsoner enabled auto-merge (squash) October 2, 2023 18:57
@larsoner larsoner merged commit 573910d into mne-tools:main Oct 2, 2023
21 checks passed
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.

2 participants