bef62df3913de4e7653f278c26d17701c5be5de7,Orange/widgets/utils/state_summary.py,,format_variables_string,#Any#,5

Before Change


        var_string = ", ".join(attrs[:-1]) + ", " + attrs[-1]
        return f"{sum(counts)} (" + var_string + ")"
    elif sum(counts) == 1:
        var_string = attrs[0][2:]
        return var_string
    else:
        types = [s for s in ["categorical", "numeric", "time", "string"] if
                 s in attrs[0]]

After Change


        // `isinstance`, which would fail in the above case
        var_type_list = [v for v in variables if type(v) is var_type]  // pylint: disable=unidiomatic-typecheck
        if var_type_list:
            not_shown = " (not shown)" if issubclass(var_type, StringVariable)\
                else ""
            agg.append((f"{var_type_name}{not_shown}", len(var_type_list)))

    attrs, counts = list(zip(*agg))
    if len(attrs) > 1:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: biolab/orange3
Commit Name: bef62df3913de4e7653f278c26d17701c5be5de7
Time: 2020-02-06
Author: aleksandra.turanjanin@gmail.com
File Name: Orange/widgets/utils/state_summary.py
Class Name:
Method Name: format_variables_string


Project Name: Netflix/vmaf
Commit Name: a412b2aeef65855ce2554292906bdf684b8d9509
Time: 2018-02-19
Author: zli@netflix.com
File Name: python/src/vmaf/core/train_test_model.py
Class Name: TrainTestModel
Method Name: from_file


Project Name: Scitator/catalyst
Commit Name: 535ca090eb4d780169494c1c17eaaba8005bcecc
Time: 2019-04-14
Author: scitator@gmail.com
File Name: catalyst/rl/offpolicy/exploration/exploration.py
Class Name: ExplorationHandler
Method Name: __init__