Skip to content

Commit

Permalink
Distributions: Pylint
Browse files Browse the repository at this point in the history
  • Loading branch information
janezd committed Sep 19, 2023
1 parent 884eae3 commit c2ab198
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Orange/widgets/visualize/owdistributions.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ def __init__(self, x, width, padding, freqs, colors, stacked, expanded,
self.padding = padding
self.stacked = stacked
self.expanded = expanded
self.__picture = None
self.polygon = None
self.hovered = False
self._tooltip = tooltip
Expand Down Expand Up @@ -498,6 +497,7 @@ def _on_hide_bars_changed(self):
self.plot.update()

def _set_smoothing_visibility(self):
# false positive, pylint: invalid-sequence-index
self.smoothing_box.setDisabled(
self.Fitters[self.fitted_distribution][1] is not AshCurve)

Expand Down Expand Up @@ -791,6 +791,7 @@ def str_params():

if not y.size:
return None, None
# false positive, pylint: invalid-sequence-index
_, dist, names, str_names = self.Fitters[self.fitted_distribution]
fitted = dist.fit(y)
params = dict(zip(names, fitted))
Expand All @@ -803,6 +804,7 @@ def _plot_approximations(self, x0, x1, fitters, colors, prior_probs):
for y, (fitter, _) in zip(ys, fitters):
if fitter is None:
continue
# false positive, pylint: invalid-sequence-index
if self.Fitters[self.fitted_distribution][1] is AshCurve:
y[:] = fitter(x, sigma=(22 - self.kde_smoothing) / 40)
else:
Expand Down Expand Up @@ -1226,6 +1228,7 @@ def _get_output_indices_cont(self):
return group_indices, values

def _get_histogram_table(self):
# bar is OK; pylint: disable=isallowed-name
var_bin = DiscreteVariable("Bin", [bar.desc for bar in self.bar_items])
var_freq = ContinuousVariable("Count")
X = []
Expand Down

0 comments on commit c2ab198

Please sign in to comment.