diff --git a/Orange/widgets/visualize/owmosaic.py b/Orange/widgets/visualize/owmosaic.py index 045ac9b9a0c..e8cc5c889e5 100644 --- a/Orange/widgets/visualize/owmosaic.py +++ b/Orange/widgets/visualize/owmosaic.py @@ -3,6 +3,7 @@ from itertools import product, chain, repeat from math import sqrt, log from operator import mul, attrgetter +from typing import Set import numpy as np from scipy.stats import distributions @@ -12,7 +13,7 @@ from AnyQt.QtWidgets import ( QGraphicsScene, QGraphicsLineItem, QGraphicsItemGroup) -from Orange.data import Table, filter, Variable, Domain +from Orange.data import Table, filter, Variable, Domain, DiscreteVariable from Orange.data.sql.table import SqlTable, LARGE_TABLE, DEFAULT_SAMPLE_TIME from Orange.preprocess import Discretize from Orange.preprocess.discretize import EqualFreq @@ -286,12 +287,12 @@ class Outputs: vizrank = SettingProvider(MosaicVizRank) settings_version = 2 use_boxes = Setting(True) - variable1 = ContextSetting(None) - variable2 = ContextSetting(None) - variable3 = ContextSetting(None) - variable4 = ContextSetting(None) - variable_color = ContextSetting(None) - selection = Setting(set(), schema_only=True) + variable1: Variable = ContextSetting(None) + variable2: Variable = ContextSetting(None) + variable3: Variable = ContextSetting(None) + variable4: Variable = ContextSetting(None) + variable_color: DiscreteVariable = ContextSetting(None) + selection: Set[str] = Setting(set(), schema_only=True) BAR_WIDTH = 5 SPACING = 4