From ce4a45b1c5d787ac4c44fd0d05509c845e2e9d86 Mon Sep 17 00:00:00 2001 From: janezd Date: Sat, 3 Oct 2020 16:23:41 +0200 Subject: [PATCH] Correlations: Annotate settings --- Orange/widgets/data/owcorrelations.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/Orange/widgets/data/owcorrelations.py b/Orange/widgets/data/owcorrelations.py index 71c3a6b8e7a..3301f646c14 100644 --- a/Orange/widgets/data/owcorrelations.py +++ b/Orange/widgets/data/owcorrelations.py @@ -5,6 +5,7 @@ from operator import attrgetter from types import SimpleNamespace from itertools import combinations, groupby, chain +from typing import List import numpy as np from scipy.stats import spearmanr, pearsonr @@ -253,8 +254,8 @@ class Outputs: settings_version = 3 settingsHandler = DomainContextHandler() - selection = ContextSetting([]) - feature = ContextSetting(None) + selection: List[ContinuousVariable] = ContextSetting([]) + feature: ContinuousVariable = ContextSetting(None) correlation_type = Setting(0) class Information(OWWidget.Information): @@ -431,10 +432,6 @@ def migrate_context(cls, context, version): sel = context.values["selection"] context.values["selection"] = [(var.name, vartype(var)) for var in sel[0]] - if version < 3: - sel = context.values["selection"] - context.values["selection"] = ([(name, vtype + 100) - for name, vtype in sel], -3) if __name__ == "__main__": # pragma: no cover