[FIX] owrank: Remove super() call from migrate_settings#1902
Merged
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
|
astaric
reviewed
Jan 9, 2017
|
|
||
| @classmethod | ||
| def migrate_settings(cls, settings, version): | ||
| super().migrate_settings(settings, version) |
Member
There was a problem hiding this comment.
Could we use explicit name of the parent class instead of the super() or would that also fail?
Contributor
Author
There was a problem hiding this comment.
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).
astaric
approved these changes
Jan 10, 2017
astaric
added a commit
to astaric/orange3
that referenced
this pull request
Jan 10, 2017
…ettings [FIX] owrank: Remove `super()` call from `migrate_settings` (cherry picked from commit 662faf4)
astaric
added a commit
to astaric/orange3
that referenced
this pull request
Jan 11, 2017
…ettings [FIX] owrank: Remove `super()` call from `migrate_settings` (cherry picked from commit 662faf4)
astaric
added a commit
to astaric/orange3
that referenced
this pull request
Jan 13, 2017
…ettings [FIX] owrank: Remove `super()` call from `migrate_settings` (cherry picked from commit 662faf4)
astaric
added a commit
to astaric/orange3
that referenced
this pull request
Jan 18, 2017
…ettings [FIX] owrank: Remove `super()` call from `migrate_settings` (cherry picked from commit 662faf4)
ales-erjavec
added a commit
to ales-erjavec/orange3
that referenced
this pull request
Jan 24, 2017
ales-erjavec
added a commit
to ales-erjavec/orange3
that referenced
this pull request
Jan 25, 2017
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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