From 6a0393492ec12d86ad0dafbdd5a6035b700399a9 Mon Sep 17 00:00:00 2001 From: PrimozGodec Date: Tue, 19 Mar 2024 16:24:57 +0100 Subject: [PATCH] owsurvivalnomogram - Making black happy --- .../widgets/owsurvivalnomogram.py | 30 ++++++++++--------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/orangecontrib/survival_analysis/widgets/owsurvivalnomogram.py b/orangecontrib/survival_analysis/widgets/owsurvivalnomogram.py index 38c4e00..187cc29 100644 --- a/orangecontrib/survival_analysis/widgets/owsurvivalnomogram.py +++ b/orangecontrib/survival_analysis/widgets/owsurvivalnomogram.py @@ -1081,20 +1081,22 @@ def create_nomogram_header_and_body( ) feature_items = [ - DiscreteFeatureItem( - name_item, attr, point, scale_x, name_offset, -scale_x * min_p - ) - if attr.is_discrete - else cont_feature_item_class( - name_item, - attr, - self.data_extremes[i], - self.get_ruler_values( - point.min(), point.max(), scale_x * point.ptp(), False - ), - scale_x, - name_offset, - -scale_x * min_p, + ( + DiscreteFeatureItem( + name_item, attr, point, scale_x, name_offset, -scale_x * min_p + ) + if attr.is_discrete + else cont_feature_item_class( + name_item, + attr, + self.data_extremes[i], + self.get_ruler_values( + point.min(), point.max(), scale_x * point.ptp(), False + ), + scale_x, + name_offset, + -scale_x * min_p, + ) ) for i, attr, name_item, point in zip( attr_inds, attributes, name_items, points