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

[FIX] owrank: Remove super() call from migrate_settings #1902

Merged
merged 1 commit into from
Jan 10, 2017

Conversation

ales-erjavec
Copy link
Contributor

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:

Could not read defaults for widget <class 'Orange.widgets.data.owrank.OWRank'>
The following error occurred:

super(): empty __class__ cell
Description of changes
Includes
  • Code changes
  • Tests
  • Documentation

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
@codecov-io
Copy link

codecov-io commented Jan 9, 2017

Current coverage is 89.25% (diff: 100%)

Merging #1902 into master will not change coverage

@@             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          

Sunburst

Powered by Codecov. Last update 097bf2a...b04f8dd

@@ -691,7 +691,6 @@ def create_scores_table(self, labels):

@classmethod
def migrate_settings(cls, settings, version):
super().migrate_settings(settings, version)
Copy link
Member

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?

Copy link
Contributor Author

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).

Copy link
Member

Choose a reason for hiding this comment

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

Good point

@astaric astaric added this to the 3.3.10 milestone Jan 10, 2017
@astaric astaric merged commit 662faf4 into biolab:master 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
@ales-erjavec ales-erjavec deleted the fixes/rank-migrate-settings branch January 27, 2017 10:39
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.

3 participants