-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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] owrank: Remove super()
call from migrate_settings
#1902
[FIX] owrank: Remove super()
call from migrate_settings
#1902
Conversation
super cannot be used in migrate_settings because the method is invoked during type creation by the widget's metaclass while the implicit `__class__` cell is not yet bound. Prevents a warning during class import: Could not read defaults for widget <class 'Orange.widgets.data.owrank.OWRank'> The following error occurred: super(): empty __class__ cell
Current coverage is 89.25% (diff: 100%)@@ master #1902 diff @@
==========================================
Files 86 86
Lines 9100 9100
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
Hits 8122 8122
Misses 978 978
Partials 0 0
|
@@ -691,7 +691,6 @@ def create_scores_table(self, labels): | |||
|
|||
@classmethod | |||
def migrate_settings(cls, settings, version): | |||
super().migrate_settings(settings, version) |
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.
Could we use explicit name of the parent class instead of the super() or would that also fail?
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.
OWWidget.migrate_settings would work. But what use would it really be? It can't do anything with the information provided by the version number (it's not its version).
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.
Good point
…ettings [FIX] owrank: Remove `super()` call from `migrate_settings` (cherry picked from commit 662faf4)
…ettings [FIX] owrank: Remove `super()` call from `migrate_settings` (cherry picked from commit 662faf4)
…ettings [FIX] owrank: Remove `super()` call from `migrate_settings` (cherry picked from commit 662faf4)
…ettings [FIX] owrank: Remove `super()` call from `migrate_settings` (cherry picked from commit 662faf4)
Issue
super cannot be used in migrate_settings because the method is invoked
during type creation by the widget's metaclass while the implicit
__class__
cell is not yet bound.Prevents a warning during class import:
Description of changes
Includes