File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
Orange/widgets/unsupervised Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 1+ import numbers
2+
13from AnyQt .QtWidgets import QFormLayout , QLineEdit
24from AnyQt .QtGui import QColor
35from AnyQt .QtCore import Qt , QTimer
@@ -409,6 +411,20 @@ def send_report(self):
409411 ))
410412 self .report_plot ()
411413
414+ @classmethod
415+ def migrate_settings (cls , settings , version ):
416+ if "variance_covered" in settings :
417+ # Due to the error in gh-1896 the variance_covered was persisted
418+ # as a NaN value, causing a TypeError in the widgets `__init__`.
419+ vc = settings ["variance_covered" ]
420+ if isinstance (vc , numbers .Real ):
421+ if numpy .isfinite (vc ):
422+ vc = int (vc )
423+ else :
424+ vc = 100
425+ settings ["variance_covered" ] = vc
426+
427+
412428def main ():
413429 import gc
414430 from AnyQt .QtWidgets import QApplication
You can’t perform that action at this time.
0 commit comments