{
    "file_diffs": [
        {
            "old_file_content": "import re\nfrom enum import IntEnum\nfrom collections import namedtuple\nfrom typing import Optional, Tuple, Iterable\n\nfrom AnyQt.QtWidgets import (\n    QListView, QHBoxLayout, QStyledItemDelegate, QButtonGroup, QWidget,\n    QLineEdit, QToolTip, QLabel, QApplication\n)\nfrom AnyQt.QtGui import QValidator, QPalette\nfrom AnyQt.QtCore import Qt, QTimer, QPoint\n\nimport Orange.data\nimport Orange.preprocess.discretize as disc\n\nfrom Orange.widgets import widget, gui, settings\nfrom Orange.widgets.utils import itemmodels, vartype, unique_everseen\nfrom Orange.widgets.utils.widgetpreview import WidgetPreview\nfrom Orange.widgets.utils.state_summary import format_summary_details\nfrom Orange.widgets.widget import Input, Output\nfrom Orange.widgets.data.oweditdomain import FixedSizeButton\n\n__all__ = [\"OWDiscretize\"]\n\n# 'Default' method delegates to 'method'\nDefault = namedtuple(\"Default\", [\"method\"])\nLeave = namedtuple(\"Leave\", [])\nMDL = namedtuple(\"MDL\", [])\nEqualFreq = namedtuple(\"EqualFreq\", [\"k\"])\nEqualWidth = namedtuple(\"EqualWidth\", [\"k\"])\nRemove = namedtuple(\"Remove\", [])\nCustom = namedtuple(\"Custom\", [\"points\"])\n\nMETHODS = [\n    (Default, ),\n    (Leave, ),\n    (MDL, ),\n    (EqualFreq, ),\n    (EqualWidth, ),\n    (Remove, ),\n    (Custom, )\n]\n\n_dispatch = {\n    Default:\n        lambda m, data, var: _dispatch[type(m.method)](m.method, data, var),\n    Leave: lambda m, data, var: var,\n    MDL: lambda m, data, var: disc.EntropyMDL()(data, var),\n    EqualFreq: lambda m, data, var: disc.EqualFreq(m.k)(data, var),\n    EqualWidth: lambda m, data, var: disc.EqualWidth(m.k)(data, var),\n    Remove: lambda m, data, var: None,\n    Custom:\n        lambda m, data, var:\n        disc.Discretizer.create_discretized_var(var, m.points)\n}\n\n\n# Variable discretization state\nDState = namedtuple(\n    \"DState\",\n    [\"method\",    # discretization method\n     \"points\",    # induced cut points\n     \"disc_var\"]  # induced discretized variable\n)\n\n\ndef is_derived(var):\n    return var.compute_value is not None\n\n\ndef is_discretized(var):\n    return isinstance(var.compute_value, disc.Discretizer)\n\n\ndef variable_key(var):\n    return vartype(var), var.name\n\n\ndef button_group_reset(group):\n    button = group.checkedButton()\n    if button is not None:\n        group.setExclusive(False)\n        button.setChecked(False)\n        group.setExclusive(True)\n\n\nclass DiscDelegate(QStyledItemDelegate):\n    def initStyleOption(self, option, index):\n        super().initStyleOption(option, index)\n        state = index.data(Qt.UserRole)\n\n        if state is not None:\n            extra = self.cutsText(state)\n            option.text = option.text + \": \" + extra\n\n    @staticmethod\n    def cutsText(state):\n        # This function has many branches, but they don't hurt readabability\n        # pylint: disable=too-many-branches\n        method = state.method\n        name = None\n        # Need a better way to distinguish discretization states\n        # i.e. between 'induced no points v.s. 'removed by choice'\n        if state.points is None and state.disc_var is not None:\n            points = \"\"\n        elif state.points is None:\n            points = \"...\"\n        elif state.points == []:\n            points = \"<removed>\"\n        else:\n            points = \", \".join(map(\"{:.2f}\".format, state.points))\n\n        if isinstance(method, Default):\n            name = None\n        elif isinstance(method, Leave):\n            name = \"(leave)\"\n        elif isinstance(method, MDL):\n            name = \"(entropy)\"\n        elif isinstance(method, EqualFreq):\n            name = \"(equal frequency k={})\".format(method.k)\n        elif isinstance(method, EqualWidth):\n            name = \"(equal width k={})\".format(method.k)\n        elif isinstance(method, Remove):\n            name = \"(removed)\"\n        elif isinstance(method, Custom):\n            name = \"(custom)\"\n        else:\n            assert False\n\n        if name is not None:\n            return points + \" \" + name\n        else:\n            return points\n\n\n#: Discretization methods\nclass Methods(IntEnum):\n    Default, Leave, MDL, EqualFreq, EqualWidth, Remove, Custom = range(7)\n\n    @staticmethod\n    def from_method(method):\n        return Methods[type(method).__name__]\n\n\ndef parse_float(string: str) -> Optional[float]:\n    try:\n        return float(string)\n    except ValueError:\n        return None\n\n\nclass IncreasingNumbersListValidator(QValidator):\n    \"\"\"\n    Match a comma separated list of non-empty and increasing number strings.\n\n    Example\n    -------\n    >>> v = IncreasingNumbersListValidator()\n    >>> v.validate(\"\", 0)   # Acceptable\n    (2, '', 0)\n    >>> v.validate(\"1\", 1)  # Acceptable\n    (2, '1', 1)\n    >>> v.validate(\"1,,\", 1)  # Intermediate\n    (1, '1,,', 1)\n    \"\"\"\n    @staticmethod\n    def itersplit(string: str) -> Iterable[Tuple[int, int]]:\n        sepiter = re.finditer(r\"(?<!\\\\),\", string)\n        start = 0\n        for match in sepiter:\n            yield start, match.start()\n            start = match.end()\n        # yield the rest if any\n        if start < len(string):\n            yield start, len(string)\n\n    def validate(self, string: str, pos: int) -> Tuple[QValidator.State, str, int]:\n        state = QValidator.Acceptable\n        # Matches non-complete intermediate numbers (while editing)\n        intermediate = re.compile(r\"([+-]?\\s?\\d*\\s?\\d*\\.?\\d*\\s?\\d*)\")\n        values = []\n        for start, end in self.itersplit(string):\n            valuestr = string[start:end].strip()\n            if not valuestr:\n                state = min(state, QValidator.Intermediate)\n                # Middle element is empty\n                continue\n            value = parse_float(valuestr)\n            if value is None:\n                if intermediate.fullmatch(valuestr):\n                    state = min(state, QValidator.Intermediate)\n                    continue\n                return QValidator.Invalid, string, pos\n            if values and value <= values[-1]:\n                state = min(state, QValidator.Intermediate)\n            else:\n                values.append(value)\n        return state, string, pos\n\n    def fixup(self, string):\n        # type: (str) -> str\n        \"\"\"\n        Fixup the input. Remove empty parts from the string.\n        \"\"\"\n        parts = [string[start: end] for start, end in self.itersplit(string)]\n        parts = [part for part in parts if part.strip()]\n        return \", \".join(parts)\n\n\ndef show_tip(\n        widget: QWidget, pos: QPoint, text: str, timeout=-1,\n        textFormat=Qt.AutoText, wordWrap=None\n):\n    propname = __name__ + \"::show_tip_qlabel\"\n    if timeout < 0:\n        timeout = widget.toolTipDuration()\n    if timeout < 0:\n        timeout = 5000 + 40 * max(0, len(text) - 100)\n    tip = widget.property(propname)\n    if not text and tip is None:\n        return\n\n    def hide():\n        w = tip.parent()\n        w.setProperty(propname, None)\n        tip.timer.stop()\n        tip.close()\n        tip.deleteLater()\n\n    if not isinstance(tip, QLabel):\n        tip = QLabel(objectName=\"tip-label\", focusPolicy=Qt.NoFocus)\n        tip.setBackgroundRole(QPalette.ToolTipBase)\n        tip.setForegroundRole(QPalette.ToolTipText)\n        tip.setPalette(QToolTip.palette())\n        tip.setFont(QApplication.font(\"QTipLabel\"))\n        tip.timer = QTimer(tip, singleShot=True, objectName=\"hide-timer\")\n        tip.timer.timeout.connect(hide)\n        widget.setProperty(propname, tip)\n        tip.setParent(widget, Qt.ToolTip)\n\n    tip.setText(text)\n    tip.setTextFormat(textFormat)\n    if wordWrap is None:\n        wordWrap = textFormat != Qt.PlainText\n    tip.setWordWrap(wordWrap)\n\n    if not text:\n        hide()\n    else:\n        tip.timer.start(timeout)\n        tip.show()\n        tip.move(pos)\n\n\nclass OWDiscretize(widget.OWWidget):\n    # pylint: disable=too-many-instance-attributes\n    name = \"Discretize\"\n    description = \"Discretize the numeric data features.\"\n    icon = \"icons/Discretize.svg\"\n    keywords = []\n\n    class Inputs:\n        data = Input(\"Data\", Orange.data.Table, doc=\"Input data table\")\n\n    class Outputs:\n        data = Output(\"Data\", Orange.data.Table, doc=\"Table with discretized features\")\n\n    settingsHandler = settings.DomainContextHandler()\n    settings_version = 2\n    saved_var_states = settings.ContextSetting({})\n\n    #: The default method name\n    default_method_name = settings.Setting(Methods.EqualFreq.name)\n    #: The k for Equal{Freq,Width}\n    default_k = settings.Setting(3)\n    #: The default cut points for custom entry\n    default_cutpoints: Tuple[float, ...] = settings.Setting(())\n    autosend = settings.Setting(True)\n\n    #: Discretization methods\n    Default, Leave, MDL, EqualFreq, EqualWidth, Remove, Custom = list(Methods)\n\n    want_main_area = False\n    resizing_enabled = False\n\n    def __init__(self):\n        super().__init__()\n\n        #: input data\n        self.data = None\n        self.class_var = None\n        #: Current variable discretization state\n        self.var_state = {}\n        #: Saved variable discretization settings (context setting)\n        self.saved_var_states = {}\n\n        self.method = Methods.Default\n        self.k = 5\n        self.cutpoints = ()\n        self.default_cutpoints = ()\n\n        box = gui.vBox(self.controlArea, self.tr(\"Default Discretization\"))\n        self._default_method_ = 0\n        self.default_bbox = rbox = gui.radioButtons(\n            box, self, \"_default_method_\", callback=self._default_disc_changed)\n        self.default_button_group = bg = rbox.findChild(QButtonGroup)\n        bg.buttonClicked[int].connect(self.set_default_method)\n\n        rb = gui.hBox(rbox)\n        self.left = gui.vBox(rb)\n        right = gui.vBox(rb)\n        rb.layout().setStretch(0, 1)\n        rb.layout().setStretch(1, 1)\n        self.options = [\n            (Methods.Default, self.tr(\"Default\")),\n            (Methods.Leave, self.tr(\"Leave numeric\")),\n            (Methods.MDL, self.tr(\"Entropy-MDL discretization\")),\n            (Methods.EqualFreq, self.tr(\"Equal-frequency discretization\")),\n            (Methods.EqualWidth, self.tr(\"Equal-width discretization\")),\n            (Methods.Remove, self.tr(\"Remove numeric variables\")),\n            (Methods.Custom, self.tr(\"Manual\")),\n        ]\n\n        for id_, opt in self.options[1:]:\n            t = gui.appendRadioButton(rbox, opt)\n            bg.setId(t, id_)\n            t.setChecked(id_ == self.default_method)\n            [right, self.left][opt.startswith(\"Equal\")].layout().addWidget(t)\n\n        def _intbox(parent, attr, callback):\n            box = gui.indentedBox(parent)\n            s = gui.spin(\n                box, self, attr, minv=2, maxv=10, label=\"Num. of intervals:\",\n                callback=callback)\n            s.setMaximumWidth(60)\n            s.setAlignment(Qt.AlignRight)\n            gui.rubber(s.box)\n            sp = box.sizePolicy()\n            sp.setControlType(sp.SpinBox)\n            return box.box\n\n        self.k_general = _intbox(self.left, \"default_k\",\n                                 self._default_disc_changed)\n        self.k_general.layout().setContentsMargins(0, 0, 0, 0)\n\n        def manual_cut_editline(text=\"\") -> QLineEdit:\n            edit = QLineEdit(\n                text=text,\n                placeholderText=\"e.g. 0.0, 0.5, 1.0\",\n                toolTip=\"Enter fixed discretization cut points (a comma \"\n                        \"separated list of strictly increasing numbers e.g. \"\n                        \"0.0, 0.5, 1.0).\",\n            )\n            @edit.textChanged.connect\n            def update():\n                validator = edit.validator()\n                if validator is not None:\n                    state, _, _ = validator.validate(edit.text(), 0)\n                else:\n                    state = QValidator.Acceptable\n                palette = edit.palette()\n                colors = {\n                    QValidator.Intermediate: (Qt.yellow, Qt.black),\n                    QValidator.Invalid: (Qt.red, Qt.black),\n                }.get(state, None)\n                if colors is None:\n                    palette = QPalette()\n                else:\n                    palette.setColor(QPalette.Base, colors[0])\n                    palette.setColor(QPalette.Text, colors[1])\n\n                cr = edit.cursorRect()\n                p = edit.mapToGlobal(cr.bottomRight())\n                edit.setPalette(palette)\n                if state != QValidator.Acceptable and edit.isVisible():\n                    show_tip(edit, p, edit.toolTip(), textFormat=Qt.RichText)\n                else:\n                    show_tip(edit, p, \"\")\n            return edit\n\n        self.manual_cuts_edit = manual_cut_editline(\n            text=\", \".join(map(str, self.default_cutpoints))\n        )\n\n        def set_manual_default_cuts():\n            text = self.manual_cuts_edit.text()\n            self.default_cutpoints = tuple(\n                float(s.strip()) for s in text.split(\",\") if s.strip())\n            self._default_disc_changed()\n        self.manual_cuts_edit.editingFinished.connect(set_manual_default_cuts)\n\n        validator = IncreasingNumbersListValidator()\n        self.manual_cuts_edit.setValidator(validator)\n        ibox = gui.indentedBox(right, orientation=Qt.Horizontal)\n        ibox.layout().addWidget(self.manual_cuts_edit)\n\n        right.layout().addStretch(10)\n        self.left.layout().addStretch(10)\n\n        self.connect_control(\n            \"default_cutpoints\",\n            lambda values: self.manual_cuts_edit.setText(\", \".join(map(str, values)))\n        )\n        vlayout = QHBoxLayout()\n        box = gui.widgetBox(\n            self.controlArea, \"Individual Attribute Settings\",\n            orientation=vlayout, spacing=8\n        )\n\n        # List view with all attributes\n        self.varview = QListView(\n            selectionMode=QListView.ExtendedSelection,\n            uniformItemSizes=True,\n        )\n        self.varview.setItemDelegate(DiscDelegate())\n        self.varmodel = itemmodels.VariableListModel()\n        self.varview.setModel(self.varmodel)\n        self.varview.selectionModel().selectionChanged.connect(\n            self._var_selection_changed\n        )\n\n        vlayout.addWidget(self.varview)\n        # Controls for individual attr settings\n        self.bbox = controlbox = gui.radioButtons(\n            box, self, \"method\", callback=self._disc_method_changed\n        )\n        vlayout.addWidget(controlbox)\n        self.variable_button_group = bg = controlbox.findChild(QButtonGroup)\n        for id_, opt in self.options[:5]:\n            b = gui.appendRadioButton(controlbox, opt)\n            bg.setId(b, id_)\n\n        self.k_specific = _intbox(controlbox, \"k\", self._disc_method_changed)\n\n        gui.appendRadioButton(controlbox, \"Remove attribute\", id=Methods.Remove)\n        b = gui.appendRadioButton(controlbox, \"Manual\", id=Methods.Custom)\n\n        self.manual_cuts_specific = manual_cut_editline()\n        self.manual_cuts_specific.setValidator(validator)\n        b.toggled[bool].connect(self.manual_cuts_specific.setEnabled)\n\n        def set_manual_cuts():\n            text = self.manual_cuts_specific.text()\n            points = [t for t in text.split(\",\") if t.split()]\n            self.cutpoints = tuple(float(t) for t in points)\n            self._disc_method_changed()\n        self.manual_cuts_specific.editingFinished.connect(set_manual_cuts)\n\n        self.connect_control(\n            \"cutpoints\",\n            lambda values: self.manual_cuts_specific.setText(\", \".join(map(str, values)))\n        )\n        ibox = gui.indentedBox(controlbox, orientation=Qt.Horizontal)\n        self.copy_current_to_manual_button = b = FixedSizeButton(\n            text=\"CC\", toolTip=\"Copy the current cut points to manual mode\",\n            enabled=False\n        )\n        b.clicked.connect(self._copy_to_manual)\n        ibox.layout().addWidget(self.manual_cuts_specific)\n        ibox.layout().addWidget(b)\n\n        gui.rubber(controlbox)\n        controlbox.setEnabled(False)\n        bg.button(self.method)\n        self.controlbox = controlbox\n\n        box = gui.auto_apply(self.controlArea, self, \"autosend\")\n        box.button.setFixedWidth(180)\n        box.layout().insertStretch(0)\n\n        self._update_spin_positions()\n\n        self.info.set_input_summary(self.info.NoInput)\n        self.info.set_output_summary(self.info.NoOutput)\n\n    @property\n    def default_method(self) -> Methods:\n        return Methods[self.default_method_name]\n\n    @default_method.setter\n    def default_method(self, method):\n        self.set_default_method(method)\n\n    def set_default_method(self, method: Methods):\n        if isinstance(method, int):\n            method = Methods(method)\n        else:\n            method = Methods.from_method(method)\n\n        if method != self.default_method:\n            self.default_method_name = method.name\n            self.default_button_group.button(method).setChecked(True)\n            self._default_disc_changed()\n\n    @Inputs.data\n    def set_data(self, data):\n        self.closeContext()\n        self.data = data\n        if self.data is not None:\n            self._initialize(data)\n            self.openContext(data)\n            # Restore the per variable discretization settings\n            self._restore(self.saved_var_states)\n            # Complete the induction of cut points\n            self._update_points()\n            self.info.set_input_summary(len(data),\n                                        format_summary_details(data))\n        else:\n            self.info.set_input_summary(self.info.NoInput)\n            self._clear()\n        self.unconditional_commit()\n\n    def _initialize(self, data):\n        # Initialize the default variable states for new data.\n        self.class_var = data.domain.class_var\n        cvars = [var for var in data.domain.variables\n                 if var.is_continuous]\n        self.varmodel[:] = cvars\n\n        has_disc_class = data.domain.has_discrete_class\n\n        def set_enabled(box: QWidget, id_: Methods, state: bool):\n            bg = box.findChild(QButtonGroup)\n            b = bg.button(id_)\n            b.setEnabled(state)\n\n        set_enabled(self.default_bbox, self.MDL, has_disc_class)\n        bg = self.bbox.findChild(QButtonGroup)\n        b = bg.button(Methods.MDL)\n        b.setEnabled(has_disc_class)\n        set_enabled(self.bbox, self.MDL, has_disc_class)\n\n        # If the newly disabled MDL button is checked then change it\n        if not has_disc_class and self.default_method == self.MDL:\n            self.default_method = Methods.Leave\n        if not has_disc_class and self.method == self.MDL:\n            self.method = Methods.Default\n\n        # Reset (initialize) the variable discretization states.\n        self._reset()\n\n    def _restore(self, saved_state):\n        # Restore variable states from a saved_state dictionary.\n        def_method = self._current_default_method()\n        for i, var in enumerate(self.varmodel):\n            key = variable_key(var)\n            if key in saved_state:\n                state = saved_state[key]\n                if isinstance(state.method, Default):\n                    state = DState(Default(def_method), None, None)\n                self._set_var_state(i, state)\n\n    def _reset(self):\n        # restore the individual variable settings back to defaults.\n        def_method = self._current_default_method()\n        self.var_state = {}\n        for i in range(len(self.varmodel)):\n            state = DState(Default(def_method), None, None)\n            self._set_var_state(i, state)\n\n    def _set_var_state(self, index, state):\n        # set the state of variable at `index` to `state`.\n        self.var_state[index] = state\n        self.varmodel.setData(self.varmodel.index(index), state, Qt.UserRole)\n\n    def _clear(self):\n        self.data = None\n        self.varmodel[:] = []\n        self.var_state = {}\n        self.saved_var_states = {}\n        self.default_button_group.button(self.MDL).setEnabled(True)\n        self.variable_button_group.button(self.MDL).setEnabled(True)\n\n    def _update_points(self):\n        \"\"\"\n        Update the induced cut points.\n        \"\"\"\n        if self.data is None:\n            return\n\n        def induce_cuts(method, data, var):\n            dvar = _dispatch[type(method)](method, data, var)\n            if dvar is None:\n                # removed\n                return [], None\n            elif dvar is var:\n                # no transformation took place\n                return None, var\n            elif is_discretized(dvar):\n                return dvar.compute_value.points, dvar\n            raise ValueError\n\n        for i, var in enumerate(self.varmodel):\n            state = self.var_state[i]\n            if state.points is None and state.disc_var is None:\n                points, dvar = induce_cuts(state.method, self.data, var)\n                new_state = state._replace(points=points, disc_var=dvar)\n                self._set_var_state(i, new_state)\n\n    def _current_default_method(self):\n        method = self.default_method\n        k = self.default_k\n        if method == Methods.Leave:\n            def_method = Leave()\n        elif method == Methods.MDL:\n            def_method = MDL()\n        elif method == Methods.EqualFreq:\n            def_method = EqualFreq(k)\n        elif method == Methods.EqualWidth:\n            def_method = EqualWidth(k)\n        elif method == Methods.Remove:\n            def_method = Remove()\n        elif method == Methods.Custom:\n            def_method = Custom(self.default_cutpoints)\n        else:\n            assert False\n        return def_method\n\n    def _current_method(self):\n        if self.method == Methods.Default:\n            method = Default(self._current_default_method())\n        elif self.method == Methods.Leave:\n            method = Leave()\n        elif self.method == Methods.MDL:\n            method = MDL()\n        elif self.method == Methods.EqualFreq:\n            method = EqualFreq(self.k)\n        elif self.method == Methods.EqualWidth:\n            method = EqualWidth(self.k)\n        elif self.method == Methods.Remove:\n            method = Remove()\n        elif self.method == Methods.Custom:\n            method = Custom(self.cutpoints)\n        else:\n            assert False\n        return method\n\n    def _update_spin_positions(self):\n        kmethods = [Methods.EqualFreq, Methods.EqualWidth]\n        self.k_general.setDisabled(self.default_method not in kmethods)\n        if self.default_method == Methods.EqualFreq:\n            self.left.layout().insertWidget(1, self.k_general)\n        elif self.default_method == Methods.EqualWidth:\n            self.left.layout().insertWidget(2, self.k_general)\n\n        self.k_specific.setDisabled(self.method not in kmethods)\n        if self.method == Methods.EqualFreq:\n            self.bbox.layout().insertWidget(4, self.k_specific)\n        elif self.method == Methods.EqualWidth:\n            self.bbox.layout().insertWidget(5, self.k_specific)\n\n    def _default_disc_changed(self):\n        self._update_spin_positions()\n        method = self._current_default_method()\n        state = DState(Default(method), None, None)\n        for i, _ in enumerate(self.varmodel):\n            if isinstance(self.var_state[i].method, Default):\n                self._set_var_state(i, state)\n        self._update_points()\n        self.commit()\n\n    def _disc_method_changed(self):\n        self._update_spin_positions()\n        indices = self.selected_indices()\n        method = self._current_method()\n        state = DState(method, None, None)\n        for idx in indices:\n            self._set_var_state(idx, state)\n        self._update_points()\n        self._copy_to_manual_update_enabled()\n        self.commit()\n\n    def _copy_to_manual(self):\n        indices = self.selected_indices()\n        # set of all methods for the current selection\n        if len(indices) != 1:\n            return\n        index = indices[0]\n        state = self.var_state[index]\n        points = state.points\n        if points is None:\n            points = ()\n        else:\n            points = tuple(state.points)\n        state = state._replace(method=Custom(points), points=None, disc_var=None)\n        self._set_var_state(index, state)\n        self.method = Methods.Custom\n        self.cutpoints = points\n        self._update_points()\n        self.commit()\n\n    def _copy_to_manual_update_enabled(self):\n        indices = self.selected_indices()\n        methods = [self.var_state[i].method for i in indices]\n        self.copy_current_to_manual_button.setEnabled(\n            len(indices) == 1 and not isinstance(methods[0], Custom))\n\n    def _var_selection_changed(self, *_):\n        self._copy_to_manual_update_enabled()\n        indices = self.selected_indices()\n        # set of all methods for the current selection\n        methods = [self.var_state[i].method for i in indices]\n\n        def key(method):\n            if isinstance(method, Default):\n                return Default, (None, )\n            return type(method), tuple(method)\n\n        mset = list(unique_everseen(methods, key=key))\n\n        self.controlbox.setEnabled(len(mset) > 0)\n        if len(mset) == 1:\n            method = mset.pop()\n            self.method = Methods.from_method(method)\n            if isinstance(method, (EqualFreq, EqualWidth)):\n                self.k = method.k\n            elif isinstance(method, Custom):\n                self.cutpoints = method.points\n        else:\n            # deselect the current button\n            self.method = -1\n            bg = self.controlbox.group\n            button_group_reset(bg)\n        self._update_spin_positions()\n\n    def selected_indices(self):\n        rows = self.varview.selectionModel().selectedRows()\n        return [index.row() for index in rows]\n\n    def method_for_index(self, index):\n        state = self.var_state[index]\n        return state.method\n\n    def discretized_var(self, index):\n        # type: (int) -> Optional[Orange.data.DiscreteVariable]\n        state = self.var_state[index]\n        if state.disc_var is not None and state.points == []:\n            # Removed by MDL Entropy\n            return None\n        else:\n            return state.disc_var\n\n    def discretized_domain(self):\n        \"\"\"\n        Return the current effective discretized domain.\n        \"\"\"\n        if self.data is None:\n            return None\n\n        # a mapping of all applied changes for variables in `varmodel`\n        mapping = {var: self.discretized_var(i)\n                   for i, var in enumerate(self.varmodel)}\n\n        def disc_var(source):\n            return mapping.get(source, source)\n\n        # map the full input domain to the new variables (where applicable)\n        attributes = [disc_var(v) for v in self.data.domain.attributes]\n        attributes = [v for v in attributes if v is not None]\n\n        class_vars = [disc_var(v) for v in self.data.domain.class_vars]\n        class_vars = [v for v in class_vars if v is not None]\n\n        domain = Orange.data.Domain(\n            attributes, class_vars, metas=self.data.domain.metas\n        )\n        return domain\n\n    def commit(self):\n        output = None\n        if self.data is not None:\n            domain = self.discretized_domain()\n            output = self.data.transform(domain)\n\n        summary = len(output) if output else self.info.NoOutput\n        details = format_summary_details(output) if output else \"\"\n        self.info.set_output_summary(summary, details)\n        self.Outputs.data.send(output)\n\n    def storeSpecificSettings(self):\n        super().storeSpecificSettings()\n        self.saved_var_states = {\n            variable_key(var):\n                self.var_state[i]._replace(points=None, disc_var=None)\n            for i, var in enumerate(self.varmodel)\n        }\n\n    def send_report(self):\n        self.report_items((\n            (\"Default method\", self.options[self.default_method][1]),))\n        if self.varmodel:\n            self.report_items(\"Thresholds\", [\n                (var.name,\n                 DiscDelegate.cutsText(self.var_state[i]) or \"leave numeric\")\n                for i, var in enumerate(self.varmodel)])\n\n    @classmethod\n    def migrate_settings(cls, settings, version):  # pylint: disable=redefined-outer-name\n        if version is None or version < 2:\n            # was stored as int indexing Methods (but offset by 1)\n            default = settings.pop(\"default_method\", 0)\n            default = Methods(default + 1)\n            settings[\"default_method_name\"] = default.name\n\n\nif __name__ == \"__main__\":  # pragma: no cover\n    WidgetPreview(OWDiscretize).run(Orange.data.Table(\"brown-selected\"))\n",
            "new_file_content": "import re\nfrom enum import IntEnum\nfrom collections import namedtuple\nfrom typing import Optional, Tuple, Iterable\n\nfrom AnyQt.QtWidgets import (\n    QListView, QHBoxLayout, QStyledItemDelegate, QButtonGroup, QWidget,\n    QLineEdit, QToolTip, QLabel, QApplication\n)\nfrom AnyQt.QtGui import QValidator, QPalette\nfrom AnyQt.QtCore import Qt, QTimer, QPoint\n\nimport Orange.data\nimport Orange.preprocess.discretize as disc\n\nfrom Orange.widgets import widget, gui, settings\nfrom Orange.widgets.utils import itemmodels, vartype, unique_everseen\nfrom Orange.widgets.utils.widgetpreview import WidgetPreview\nfrom Orange.widgets.utils.state_summary import format_summary_details\nfrom Orange.widgets.widget import Input, Output\nfrom Orange.widgets.data.oweditdomain import FixedSizeButton\n\n__all__ = [\"OWDiscretize\"]\n\n# 'Default' method delegates to 'method'\nDefault = namedtuple(\"Default\", [\"method\"])\nLeave = namedtuple(\"Leave\", [])\nMDL = namedtuple(\"MDL\", [])\nEqualFreq = namedtuple(\"EqualFreq\", [\"k\"])\nEqualWidth = namedtuple(\"EqualWidth\", [\"k\"])\nRemove = namedtuple(\"Remove\", [])\nCustom = namedtuple(\"Custom\", [\"points\"])\n\nMETHODS = [\n    (Default, ),\n    (Leave, ),\n    (MDL, ),\n    (EqualFreq, ),\n    (EqualWidth, ),\n    (Remove, ),\n    (Custom, )\n]\n\n_dispatch = {\n    Default:\n        lambda m, data, var: _dispatch[type(m.method)](m.method, data, var),\n    Leave: lambda m, data, var: var,\n    MDL: lambda m, data, var: disc.EntropyMDL()(data, var),\n    EqualFreq: lambda m, data, var: disc.EqualFreq(m.k)(data, var),\n    EqualWidth: lambda m, data, var: disc.EqualWidth(m.k)(data, var),\n    Remove: lambda m, data, var: None,\n    Custom:\n        lambda m, data, var:\n        disc.Discretizer.create_discretized_var(var, m.points)\n}\n\n\n# Variable discretization state\nDState = namedtuple(\n    \"DState\",\n    [\"method\",    # discretization method\n     \"points\",    # induced cut points\n     \"disc_var\"]  # induced discretized variable\n)\n\n\ndef is_derived(var):\n    return var.compute_value is not None\n\n\ndef is_discretized(var):\n    return isinstance(var.compute_value, disc.Discretizer)\n\n\ndef variable_key(var):\n    return vartype(var), var.name\n\n\ndef button_group_reset(group):\n    button = group.checkedButton()\n    if button is not None:\n        group.setExclusive(False)\n        button.setChecked(False)\n        group.setExclusive(True)\n\n\nclass DiscDelegate(QStyledItemDelegate):\n    def initStyleOption(self, option, index):\n        super().initStyleOption(option, index)\n        state = index.data(Qt.UserRole)\n\n        if state is not None:\n            extra = self.cutsText(state)\n            option.text = option.text + \": \" + extra\n\n    @staticmethod\n    def cutsText(state):\n        # This function has many branches, but they don't hurt readabability\n        # pylint: disable=too-many-branches\n        method = state.method\n        name = None\n        # Need a better way to distinguish discretization states\n        # i.e. between 'induced no points v.s. 'removed by choice'\n        if state.points is None and state.disc_var is not None:\n            points = \"\"\n        elif state.points is None:\n            points = \"...\"\n        elif state.points == []:\n            points = \"<removed>\"\n        else:\n            points = \", \".join(map(\"{:.2f}\".format, state.points))\n\n        if isinstance(method, Default):\n            name = None\n        elif isinstance(method, Leave):\n            name = \"(leave)\"\n        elif isinstance(method, MDL):\n            name = \"(entropy)\"\n        elif isinstance(method, EqualFreq):\n            name = \"(equal frequency k={})\".format(method.k)\n        elif isinstance(method, EqualWidth):\n            name = \"(equal width k={})\".format(method.k)\n        elif isinstance(method, Remove):\n            name = \"(removed)\"\n        elif isinstance(method, Custom):\n            name = \"(custom)\"\n        else:\n            assert False\n\n        if name is not None:\n            return points + \" \" + name\n        else:\n            return points\n\n\n#: Discretization methods\nclass Methods(IntEnum):\n    Default, Leave, MDL, EqualFreq, EqualWidth, Remove, Custom = range(7)\n\n    @staticmethod\n    def from_method(method):\n        return Methods[type(method).__name__]\n\n\ndef parse_float(string: str) -> Optional[float]:\n    try:\n        return float(string)\n    except ValueError:\n        return None\n\n\nclass IncreasingNumbersListValidator(QValidator):\n    \"\"\"\n    Match a comma separated list of non-empty and increasing number strings.\n\n    Example\n    -------\n    >>> v = IncreasingNumbersListValidator()\n    >>> v.validate(\"\", 0)   # Acceptable\n    (2, '', 0)\n    >>> v.validate(\"1\", 1)  # Acceptable\n    (2, '1', 1)\n    >>> v.validate(\"1,,\", 1)  # Intermediate\n    (1, '1,,', 1)\n    \"\"\"\n    @staticmethod\n    def itersplit(string: str) -> Iterable[Tuple[int, int]]:\n        sepiter = re.finditer(r\"(?<!\\\\),\", string)\n        start = 0\n        for match in sepiter:\n            yield start, match.start()\n            start = match.end()\n        # yield the rest if any\n        if start < len(string):\n            yield start, len(string)\n\n    def validate(self, string: str, pos: int) -> Tuple[QValidator.State, str, int]:\n        state = QValidator.Acceptable\n        # Matches non-complete intermediate numbers (while editing)\n        intermediate = re.compile(r\"([+-]?\\s?\\d*\\s?\\d*\\.?\\d*\\s?\\d*)\")\n        values = []\n        for start, end in self.itersplit(string):\n            valuestr = string[start:end].strip()\n            if not valuestr:\n                # Middle element is empty (will be fixed by fixup)\n                continue\n            value = parse_float(valuestr)\n            if value is None:\n                if intermediate.fullmatch(valuestr):\n                    state = min(state, QValidator.Intermediate)\n                    continue\n                return QValidator.Invalid, string, pos\n            if values and value <= values[-1]:\n                state = min(state, QValidator.Intermediate)\n            else:\n                values.append(value)\n        return state, string, pos\n\n    def fixup(self, string):\n        # type: (str) -> str\n        \"\"\"\n        Fixup the input. Remove empty parts from the string.\n        \"\"\"\n        parts = [string[start: end] for start, end in self.itersplit(string)]\n        parts = [part for part in parts if part.strip()]\n        return \", \".join(parts)\n\n\ndef show_tip(\n        widget: QWidget, pos: QPoint, text: str, timeout=-1,\n        textFormat=Qt.AutoText, wordWrap=None\n):\n    propname = __name__ + \"::show_tip_qlabel\"\n    if timeout < 0:\n        timeout = widget.toolTipDuration()\n    if timeout < 0:\n        timeout = 5000 + 40 * max(0, len(text) - 100)\n    tip = widget.property(propname)\n    if not text and tip is None:\n        return\n\n    def hide():\n        w = tip.parent()\n        w.setProperty(propname, None)\n        tip.timer.stop()\n        tip.close()\n        tip.deleteLater()\n\n    if not isinstance(tip, QLabel):\n        tip = QLabel(objectName=\"tip-label\", focusPolicy=Qt.NoFocus)\n        tip.setBackgroundRole(QPalette.ToolTipBase)\n        tip.setForegroundRole(QPalette.ToolTipText)\n        tip.setPalette(QToolTip.palette())\n        tip.setFont(QApplication.font(\"QTipLabel\"))\n        tip.timer = QTimer(tip, singleShot=True, objectName=\"hide-timer\")\n        tip.timer.timeout.connect(hide)\n        widget.setProperty(propname, tip)\n        tip.setParent(widget, Qt.ToolTip)\n\n    tip.setText(text)\n    tip.setTextFormat(textFormat)\n    if wordWrap is None:\n        wordWrap = textFormat != Qt.PlainText\n    tip.setWordWrap(wordWrap)\n\n    if not text:\n        hide()\n    else:\n        tip.timer.start(timeout)\n        tip.show()\n        tip.move(pos)\n\n\nclass OWDiscretize(widget.OWWidget):\n    # pylint: disable=too-many-instance-attributes\n    name = \"Discretize\"\n    description = \"Discretize the numeric data features.\"\n    icon = \"icons/Discretize.svg\"\n    keywords = []\n\n    class Inputs:\n        data = Input(\"Data\", Orange.data.Table, doc=\"Input data table\")\n\n    class Outputs:\n        data = Output(\"Data\", Orange.data.Table, doc=\"Table with discretized features\")\n\n    settingsHandler = settings.DomainContextHandler()\n    settings_version = 2\n    saved_var_states = settings.ContextSetting({})\n\n    #: The default method name\n    default_method_name = settings.Setting(Methods.EqualFreq.name)\n    #: The k for Equal{Freq,Width}\n    default_k = settings.Setting(3)\n    #: The default cut points for custom entry\n    default_cutpoints: Tuple[float, ...] = settings.Setting(())\n    autosend = settings.Setting(True)\n\n    #: Discretization methods\n    Default, Leave, MDL, EqualFreq, EqualWidth, Remove, Custom = list(Methods)\n\n    want_main_area = False\n    resizing_enabled = False\n\n    def __init__(self):\n        super().__init__()\n\n        #: input data\n        self.data = None\n        self.class_var = None\n        #: Current variable discretization state\n        self.var_state = {}\n        #: Saved variable discretization settings (context setting)\n        self.saved_var_states = {}\n\n        self.method = Methods.Default\n        self.k = 5\n        self.cutpoints = ()\n        self.default_cutpoints = ()\n\n        box = gui.vBox(self.controlArea, self.tr(\"Default Discretization\"))\n        self._default_method_ = 0\n        self.default_bbox = rbox = gui.radioButtons(\n            box, self, \"_default_method_\", callback=self._default_disc_changed)\n        self.default_button_group = bg = rbox.findChild(QButtonGroup)\n        bg.buttonClicked[int].connect(self.set_default_method)\n\n        rb = gui.hBox(rbox)\n        self.left = gui.vBox(rb)\n        right = gui.vBox(rb)\n        rb.layout().setStretch(0, 1)\n        rb.layout().setStretch(1, 1)\n        self.options = [\n            (Methods.Default, self.tr(\"Default\")),\n            (Methods.Leave, self.tr(\"Leave numeric\")),\n            (Methods.MDL, self.tr(\"Entropy-MDL discretization\")),\n            (Methods.EqualFreq, self.tr(\"Equal-frequency discretization\")),\n            (Methods.EqualWidth, self.tr(\"Equal-width discretization\")),\n            (Methods.Remove, self.tr(\"Remove numeric variables\")),\n            (Methods.Custom, self.tr(\"Manual\")),\n        ]\n\n        for id_, opt in self.options[1:]:\n            t = gui.appendRadioButton(rbox, opt)\n            bg.setId(t, id_)\n            t.setChecked(id_ == self.default_method)\n            [right, self.left][opt.startswith(\"Equal\")].layout().addWidget(t)\n\n        def _intbox(parent, attr, callback):\n            box = gui.indentedBox(parent)\n            s = gui.spin(\n                box, self, attr, minv=2, maxv=10, label=\"Num. of intervals:\",\n                callback=callback)\n            s.setMaximumWidth(60)\n            s.setAlignment(Qt.AlignRight)\n            gui.rubber(s.box)\n            sp = box.sizePolicy()\n            sp.setControlType(sp.SpinBox)\n            return box.box\n\n        self.k_general = _intbox(self.left, \"default_k\",\n                                 self._default_disc_changed)\n        self.k_general.layout().setContentsMargins(0, 0, 0, 0)\n\n        def manual_cut_editline(text=\"\") -> QLineEdit:\n            edit = QLineEdit(\n                text=text,\n                placeholderText=\"e.g. 0.0, 0.5, 1.0\",\n                toolTip=\"Enter fixed discretization cut points (a comma \"\n                        \"separated list of strictly increasing numbers e.g. \"\n                        \"0.0, 0.5, 1.0).\",\n            )\n            @edit.textChanged.connect\n            def update():\n                validator = edit.validator()\n                if validator is not None:\n                    state, _, _ = validator.validate(edit.text(), 0)\n                else:\n                    state = QValidator.Acceptable\n                palette = edit.palette()\n                colors = {\n                    QValidator.Intermediate: (Qt.yellow, Qt.black),\n                    QValidator.Invalid: (Qt.red, Qt.black),\n                }.get(state, None)\n                if colors is None:\n                    palette = QPalette()\n                else:\n                    palette.setColor(QPalette.Base, colors[0])\n                    palette.setColor(QPalette.Text, colors[1])\n\n                cr = edit.cursorRect()\n                p = edit.mapToGlobal(cr.bottomRight())\n                edit.setPalette(palette)\n                if state != QValidator.Acceptable and edit.isVisible():\n                    show_tip(edit, p, edit.toolTip(), textFormat=Qt.RichText)\n                else:\n                    show_tip(edit, p, \"\")\n            return edit\n\n        self.manual_cuts_edit = manual_cut_editline(\n            text=\", \".join(map(str, self.default_cutpoints))\n        )\n\n        def set_manual_default_cuts():\n            text = self.manual_cuts_edit.text()\n            self.default_cutpoints = tuple(\n                float(s.strip()) for s in text.split(\",\") if s.strip())\n            self._default_disc_changed()\n        self.manual_cuts_edit.editingFinished.connect(set_manual_default_cuts)\n\n        validator = IncreasingNumbersListValidator()\n        self.manual_cuts_edit.setValidator(validator)\n        ibox = gui.indentedBox(right, orientation=Qt.Horizontal)\n        ibox.layout().addWidget(self.manual_cuts_edit)\n\n        right.layout().addStretch(10)\n        self.left.layout().addStretch(10)\n\n        self.connect_control(\n            \"default_cutpoints\",\n            lambda values: self.manual_cuts_edit.setText(\", \".join(map(str, values)))\n        )\n        vlayout = QHBoxLayout()\n        box = gui.widgetBox(\n            self.controlArea, \"Individual Attribute Settings\",\n            orientation=vlayout, spacing=8\n        )\n\n        # List view with all attributes\n        self.varview = QListView(\n            selectionMode=QListView.ExtendedSelection,\n            uniformItemSizes=True,\n        )\n        self.varview.setItemDelegate(DiscDelegate())\n        self.varmodel = itemmodels.VariableListModel()\n        self.varview.setModel(self.varmodel)\n        self.varview.selectionModel().selectionChanged.connect(\n            self._var_selection_changed\n        )\n\n        vlayout.addWidget(self.varview)\n        # Controls for individual attr settings\n        self.bbox = controlbox = gui.radioButtons(\n            box, self, \"method\", callback=self._disc_method_changed\n        )\n        vlayout.addWidget(controlbox)\n        self.variable_button_group = bg = controlbox.findChild(QButtonGroup)\n        for id_, opt in self.options[:5]:\n            b = gui.appendRadioButton(controlbox, opt)\n            bg.setId(b, id_)\n\n        self.k_specific = _intbox(controlbox, \"k\", self._disc_method_changed)\n\n        gui.appendRadioButton(controlbox, \"Remove attribute\", id=Methods.Remove)\n        b = gui.appendRadioButton(controlbox, \"Manual\", id=Methods.Custom)\n\n        self.manual_cuts_specific = manual_cut_editline()\n        self.manual_cuts_specific.setValidator(validator)\n        b.toggled[bool].connect(self.manual_cuts_specific.setEnabled)\n\n        def set_manual_cuts():\n            text = self.manual_cuts_specific.text()\n            points = [t for t in text.split(\",\") if t.split()]\n            self.cutpoints = tuple(float(t) for t in points)\n            self._disc_method_changed()\n        self.manual_cuts_specific.editingFinished.connect(set_manual_cuts)\n\n        self.connect_control(\n            \"cutpoints\",\n            lambda values: self.manual_cuts_specific.setText(\", \".join(map(str, values)))\n        )\n        ibox = gui.indentedBox(controlbox, orientation=Qt.Horizontal)\n        self.copy_current_to_manual_button = b = FixedSizeButton(\n            text=\"CC\", toolTip=\"Copy the current cut points to manual mode\",\n            enabled=False\n        )\n        b.clicked.connect(self._copy_to_manual)\n        ibox.layout().addWidget(self.manual_cuts_specific)\n        ibox.layout().addWidget(b)\n\n        gui.rubber(controlbox)\n        controlbox.setEnabled(False)\n        bg.button(self.method)\n        self.controlbox = controlbox\n\n        box = gui.auto_apply(self.controlArea, self, \"autosend\")\n        box.button.setFixedWidth(180)\n        box.layout().insertStretch(0)\n\n        self._update_spin_positions()\n\n        self.info.set_input_summary(self.info.NoInput)\n        self.info.set_output_summary(self.info.NoOutput)\n\n    @property\n    def default_method(self) -> Methods:\n        return Methods[self.default_method_name]\n\n    @default_method.setter\n    def default_method(self, method):\n        self.set_default_method(method)\n\n    def set_default_method(self, method: Methods):\n        if isinstance(method, int):\n            method = Methods(method)\n        else:\n            method = Methods.from_method(method)\n\n        if method != self.default_method:\n            self.default_method_name = method.name\n            self.default_button_group.button(method).setChecked(True)\n            self._default_disc_changed()\n\n    @Inputs.data\n    def set_data(self, data):\n        self.closeContext()\n        self.data = data\n        if self.data is not None:\n            self._initialize(data)\n            self.openContext(data)\n            # Restore the per variable discretization settings\n            self._restore(self.saved_var_states)\n            # Complete the induction of cut points\n            self._update_points()\n            self.info.set_input_summary(len(data),\n                                        format_summary_details(data))\n        else:\n            self.info.set_input_summary(self.info.NoInput)\n            self._clear()\n        self.unconditional_commit()\n\n    def _initialize(self, data):\n        # Initialize the default variable states for new data.\n        self.class_var = data.domain.class_var\n        cvars = [var for var in data.domain.variables\n                 if var.is_continuous]\n        self.varmodel[:] = cvars\n\n        has_disc_class = data.domain.has_discrete_class\n\n        def set_enabled(box: QWidget, id_: Methods, state: bool):\n            bg = box.findChild(QButtonGroup)\n            b = bg.button(id_)\n            b.setEnabled(state)\n\n        set_enabled(self.default_bbox, self.MDL, has_disc_class)\n        bg = self.bbox.findChild(QButtonGroup)\n        b = bg.button(Methods.MDL)\n        b.setEnabled(has_disc_class)\n        set_enabled(self.bbox, self.MDL, has_disc_class)\n\n        # If the newly disabled MDL button is checked then change it\n        if not has_disc_class and self.default_method == self.MDL:\n            self.default_method = Methods.Leave\n        if not has_disc_class and self.method == self.MDL:\n            self.method = Methods.Default\n\n        # Reset (initialize) the variable discretization states.\n        self._reset()\n\n    def _restore(self, saved_state):\n        # Restore variable states from a saved_state dictionary.\n        def_method = self._current_default_method()\n        for i, var in enumerate(self.varmodel):\n            key = variable_key(var)\n            if key in saved_state:\n                state = saved_state[key]\n                if isinstance(state.method, Default):\n                    state = DState(Default(def_method), None, None)\n                self._set_var_state(i, state)\n\n    def _reset(self):\n        # restore the individual variable settings back to defaults.\n        def_method = self._current_default_method()\n        self.var_state = {}\n        for i in range(len(self.varmodel)):\n            state = DState(Default(def_method), None, None)\n            self._set_var_state(i, state)\n\n    def _set_var_state(self, index, state):\n        # set the state of variable at `index` to `state`.\n        self.var_state[index] = state\n        self.varmodel.setData(self.varmodel.index(index), state, Qt.UserRole)\n\n    def _clear(self):\n        self.data = None\n        self.varmodel[:] = []\n        self.var_state = {}\n        self.saved_var_states = {}\n        self.default_button_group.button(self.MDL).setEnabled(True)\n        self.variable_button_group.button(self.MDL).setEnabled(True)\n\n    def _update_points(self):\n        \"\"\"\n        Update the induced cut points.\n        \"\"\"\n        if self.data is None:\n            return\n\n        def induce_cuts(method, data, var):\n            dvar = _dispatch[type(method)](method, data, var)\n            if dvar is None:\n                # removed\n                return [], None\n            elif dvar is var:\n                # no transformation took place\n                return None, var\n            elif is_discretized(dvar):\n                return dvar.compute_value.points, dvar\n            raise ValueError\n\n        for i, var in enumerate(self.varmodel):\n            state = self.var_state[i]\n            if state.points is None and state.disc_var is None:\n                points, dvar = induce_cuts(state.method, self.data, var)\n                new_state = state._replace(points=points, disc_var=dvar)\n                self._set_var_state(i, new_state)\n\n    def _current_default_method(self):\n        method = self.default_method\n        k = self.default_k\n        if method == Methods.Leave:\n            def_method = Leave()\n        elif method == Methods.MDL:\n            def_method = MDL()\n        elif method == Methods.EqualFreq:\n            def_method = EqualFreq(k)\n        elif method == Methods.EqualWidth:\n            def_method = EqualWidth(k)\n        elif method == Methods.Remove:\n            def_method = Remove()\n        elif method == Methods.Custom:\n            def_method = Custom(self.default_cutpoints)\n        else:\n            assert False\n        return def_method\n\n    def _current_method(self):\n        if self.method == Methods.Default:\n            method = Default(self._current_default_method())\n        elif self.method == Methods.Leave:\n            method = Leave()\n        elif self.method == Methods.MDL:\n            method = MDL()\n        elif self.method == Methods.EqualFreq:\n            method = EqualFreq(self.k)\n        elif self.method == Methods.EqualWidth:\n            method = EqualWidth(self.k)\n        elif self.method == Methods.Remove:\n            method = Remove()\n        elif self.method == Methods.Custom:\n            method = Custom(self.cutpoints)\n        else:\n            assert False\n        return method\n\n    def _update_spin_positions(self):\n        kmethods = [Methods.EqualFreq, Methods.EqualWidth]\n        self.k_general.setDisabled(self.default_method not in kmethods)\n        if self.default_method == Methods.EqualFreq:\n            self.left.layout().insertWidget(1, self.k_general)\n        elif self.default_method == Methods.EqualWidth:\n            self.left.layout().insertWidget(2, self.k_general)\n\n        self.k_specific.setDisabled(self.method not in kmethods)\n        if self.method == Methods.EqualFreq:\n            self.bbox.layout().insertWidget(4, self.k_specific)\n        elif self.method == Methods.EqualWidth:\n            self.bbox.layout().insertWidget(5, self.k_specific)\n\n    def _default_disc_changed(self):\n        self._update_spin_positions()\n        method = self._current_default_method()\n        state = DState(Default(method), None, None)\n        for i, _ in enumerate(self.varmodel):\n            if isinstance(self.var_state[i].method, Default):\n                self._set_var_state(i, state)\n        self._update_points()\n        self.commit()\n\n    def _disc_method_changed(self):\n        self._update_spin_positions()\n        indices = self.selected_indices()\n        method = self._current_method()\n        state = DState(method, None, None)\n        for idx in indices:\n            self._set_var_state(idx, state)\n        self._update_points()\n        self._copy_to_manual_update_enabled()\n        self.commit()\n\n    def _copy_to_manual(self):\n        indices = self.selected_indices()\n        # set of all methods for the current selection\n        if len(indices) != 1:\n            return\n        index = indices[0]\n        state = self.var_state[index]\n        points = state.points\n        if points is None:\n            points = ()\n        else:\n            points = tuple(state.points)\n        state = state._replace(method=Custom(points), points=None, disc_var=None)\n        self._set_var_state(index, state)\n        self.method = Methods.Custom\n        self.cutpoints = points\n        self._update_points()\n        self.commit()\n\n    def _copy_to_manual_update_enabled(self):\n        indices = self.selected_indices()\n        methods = [self.var_state[i].method for i in indices]\n        self.copy_current_to_manual_button.setEnabled(\n            len(indices) == 1 and not isinstance(methods[0], Custom))\n\n    def _var_selection_changed(self, *_):\n        self._copy_to_manual_update_enabled()\n        indices = self.selected_indices()\n        # set of all methods for the current selection\n        methods = [self.var_state[i].method for i in indices]\n\n        def key(method):\n            if isinstance(method, Default):\n                return Default, (None, )\n            return type(method), tuple(method)\n\n        mset = list(unique_everseen(methods, key=key))\n\n        self.controlbox.setEnabled(len(mset) > 0)\n        if len(mset) == 1:\n            method = mset.pop()\n            self.method = Methods.from_method(method)\n            if isinstance(method, (EqualFreq, EqualWidth)):\n                self.k = method.k\n            elif isinstance(method, Custom):\n                self.cutpoints = method.points\n        else:\n            # deselect the current button\n            self.method = -1\n            bg = self.controlbox.group\n            button_group_reset(bg)\n        self._update_spin_positions()\n\n    def selected_indices(self):\n        rows = self.varview.selectionModel().selectedRows()\n        return [index.row() for index in rows]\n\n    def method_for_index(self, index):\n        state = self.var_state[index]\n        return state.method\n\n    def discretized_var(self, index):\n        # type: (int) -> Optional[Orange.data.DiscreteVariable]\n        state = self.var_state[index]\n        if state.disc_var is not None and state.points == []:\n            # Removed by MDL Entropy\n            return None\n        else:\n            return state.disc_var\n\n    def discretized_domain(self):\n        \"\"\"\n        Return the current effective discretized domain.\n        \"\"\"\n        if self.data is None:\n            return None\n\n        # a mapping of all applied changes for variables in `varmodel`\n        mapping = {var: self.discretized_var(i)\n                   for i, var in enumerate(self.varmodel)}\n\n        def disc_var(source):\n            return mapping.get(source, source)\n\n        # map the full input domain to the new variables (where applicable)\n        attributes = [disc_var(v) for v in self.data.domain.attributes]\n        attributes = [v for v in attributes if v is not None]\n\n        class_vars = [disc_var(v) for v in self.data.domain.class_vars]\n        class_vars = [v for v in class_vars if v is not None]\n\n        domain = Orange.data.Domain(\n            attributes, class_vars, metas=self.data.domain.metas\n        )\n        return domain\n\n    def commit(self):\n        output = None\n        if self.data is not None:\n            domain = self.discretized_domain()\n            output = self.data.transform(domain)\n\n        summary = len(output) if output else self.info.NoOutput\n        details = format_summary_details(output) if output else \"\"\n        self.info.set_output_summary(summary, details)\n        self.Outputs.data.send(output)\n\n    def storeSpecificSettings(self):\n        super().storeSpecificSettings()\n        self.saved_var_states = {\n            variable_key(var):\n                self.var_state[i]._replace(points=None, disc_var=None)\n            for i, var in enumerate(self.varmodel)\n        }\n\n    def send_report(self):\n        self.report_items((\n            (\"Default method\", self.options[self.default_method][1]),))\n        if self.varmodel:\n            self.report_items(\"Thresholds\", [\n                (var.name,\n                 DiscDelegate.cutsText(self.var_state[i]) or \"leave numeric\")\n                for i, var in enumerate(self.varmodel)])\n\n    @classmethod\n    def migrate_settings(cls, settings, version):  # pylint: disable=redefined-outer-name\n        if version is None or version < 2:\n            # was stored as int indexing Methods (but offset by 1)\n            default = settings.pop(\"default_method\", 0)\n            default = Methods(default + 1)\n            settings[\"default_method_name\"] = default.name\n\n\nif __name__ == \"__main__\":  # pragma: no cover\n    WidgetPreview(OWDiscretize).run(Orange.data.Table(\"brown-selected\"))\n",
            "header": {
                "file": {
                    "path": "Orange/widgets/data/owdiscretize.py"
                },
                "misc_line": null
            },
            "index_line": {
                "old_commit_hash": "8c3c33e02",
                "new_commit_hash": "159dd6888",
                "mode": "100644"
            },
            "is_binary_file": false,
            "binary_line": null,
            "minus_file": {
                "path": "a/Orange/widgets/data/owdiscretize.py"
            },
            "plus_file": {
                "path": "b/Orange/widgets/data/owdiscretize.py"
            },
            "hunks": [
                {
                    "descriptor": {
                        "old_range": {
                            "start": 182,
                            "length": 8
                        },
                        "new_range": {
                            "start": 182,
                            "length": 7
                        },
                        "section": "class IncreasingNumbersListValidator(QValidator):"
                    },
                    "line_group": {
                        "all_lines": [
                            {
                                "content": "        for start, end in self.itersplit(string):",
                                "type": "context"
                            },
                            {
                                "content": "            valuestr = string[start:end].strip()",
                                "type": "context"
                            },
                            {
                                "content": "            if not valuestr:",
                                "type": "context"
                            },
                            {
                                "content": "                state = min(state, QValidator.Intermediate)",
                                "type": "deleted"
                            },
                            {
                                "content": "                # Middle element is empty",
                                "type": "deleted"
                            },
                            {
                                "content": "                # Middle element is empty (will be fixed by fixup)",
                                "type": "added"
                            },
                            {
                                "content": "                continue",
                                "type": "context"
                            },
                            {
                                "content": "            value = parse_float(valuestr)",
                                "type": "context"
                            },
                            {
                                "content": "            if value is None:",
                                "type": "context"
                            }
                        ]
                    },
                    "modified_entities": [
                        {
                            "file_name": "Orange/widgets/data/owdiscretize.py",
                            "type": "method",
                            "name": "IncreasingNumbersListValidator.validate",
                            "content": "class IncreasingNumbersListValidator(QValidator):\n    \"\"\"\n    Match a comma separated list of non-empty and increasing number strings.\n\n    Example\n    -------\n    >>> v = IncreasingNumbersListValidator()\n    >>> v.validate(\"\", 0)   # Acceptable\n    (2, '', 0)\n    >>> v.validate(\"1\", 1)  # Acceptable\n    (2, '1', 1)\n    >>> v.validate(\"1,,\", 1)  # Intermediate\n    (1, '1,,', 1)\n    \"\"\"\n    @staticmethod\n    def itersplit(string: str) -> Iterable[Tuple[int, int]]:\n        sepiter = re.finditer(r\"(?<!\\\\),\", string)\n        start = 0\n        for match in sepiter:\n            yield start, match.start()\n            start = match.end()\n        # yield the rest if any\n        if start < len(string):\n            yield start, len(string)\n\n    def validate(self, string: str, pos: int) -> Tuple[QValidator.State, str, int]:\n        state = QValidator.Acceptable\n        # Matches non-complete intermediate numbers (while editing)\n        intermediate = re.compile(r\"([+-]?\\s?\\d*\\s?\\d*\\.?\\d*\\s?\\d*)\")\n        values = []\n        for start, end in self.itersplit(string):\n            valuestr = string[start:end].strip()\n            if not valuestr:\n                state = min(state, QValidator.Intermediate)\n                # Middle element is empty\n                continue\n            value = parse_float(valuestr)\n            if value is None:\n                if intermediate.fullmatch(valuestr):\n                    state = min(state, QValidator.Intermediate)\n                    continue\n                return QValidator.Invalid, string, pos\n            if values and value <= values[-1]:\n                state = min(state, QValidator.Intermediate)\n            else:\n                values.append(value)\n        return state, string, pos\n\n    def fixup(self, string):\n        # type: (str) -> str\n        \"\"\"\n        Fixup the input. Remove empty parts from the string.\n        \"\"\"\n        parts = [string[start: end] for start, end in self.itersplit(string)]\n        parts = [part for part in parts if part.strip()]\n        return \", \".join(parts)",
                            "ast_type_str": "ClassDef",
                            "start_lineno": 177,
                            "end_lineno": 198,
                            "parent": {
                                "file_name": "Orange/widgets/data/owdiscretize.py",
                                "type": "class",
                                "name": "IncreasingNumbersListValidator",
                                "content": "class IncreasingNumbersListValidator(QValidator):\n    \"\"\"\n    Match a comma separated list of non-empty and increasing number strings.\n\n    Example\n    -------\n    >>> v = IncreasingNumbersListValidator()\n    >>> v.validate(\"\", 0)   # Acceptable\n    (2, '', 0)\n    >>> v.validate(\"1\", 1)  # Acceptable\n    (2, '1', 1)\n    >>> v.validate(\"1,,\", 1)  # Intermediate\n    (1, '1,,', 1)\n    \"\"\"\n    @staticmethod\n    def itersplit(string: str) -> Iterable[Tuple[int, int]]:\n        sepiter = re.finditer(r\"(?<!\\\\),\", string)\n        start = 0\n        for match in sepiter:\n            yield start, match.start()\n            start = match.end()\n        # yield the rest if any\n        if start < len(string):\n            yield start, len(string)\n\n    def validate(self, string: str, pos: int) -> Tuple[QValidator.State, str, int]:\n        state = QValidator.Acceptable\n        # Matches non-complete intermediate numbers (while editing)\n        intermediate = re.compile(r\"([+-]?\\s?\\d*\\s?\\d*\\.?\\d*\\s?\\d*)\")\n        values = []\n        for start, end in self.itersplit(string):\n            valuestr = string[start:end].strip()\n            if not valuestr:\n                state = min(state, QValidator.Intermediate)\n                # Middle element is empty\n                continue\n            value = parse_float(valuestr)\n            if value is None:\n                if intermediate.fullmatch(valuestr):\n                    state = min(state, QValidator.Intermediate)\n                    continue\n                return QValidator.Invalid, string, pos\n            if values and value <= values[-1]:\n                state = min(state, QValidator.Intermediate)\n            else:\n                values.append(value)\n        return state, string, pos\n\n    def fixup(self, string):\n        # type: (str) -> str\n        \"\"\"\n        Fixup the input. Remove empty parts from the string.\n        \"\"\"\n        parts = [string[start: end] for start, end in self.itersplit(string)]\n        parts = [part for part in parts if part.strip()]\n        return \", \".join(parts)",
                                "ast_type_str": "ClassDef",
                                "start_lineno": 152,
                                "end_lineno": 207,
                                "parent": null
                            }
                        },
                        {
                            "file_name": "Orange/widgets/data/owdiscretize.py",
                            "type": "class",
                            "name": "IncreasingNumbersListValidator",
                            "content": "class IncreasingNumbersListValidator(QValidator):\n    \"\"\"\n    Match a comma separated list of non-empty and increasing number strings.\n\n    Example\n    -------\n    >>> v = IncreasingNumbersListValidator()\n    >>> v.validate(\"\", 0)   # Acceptable\n    (2, '', 0)\n    >>> v.validate(\"1\", 1)  # Acceptable\n    (2, '1', 1)\n    >>> v.validate(\"1,,\", 1)  # Intermediate\n    (1, '1,,', 1)\n    \"\"\"\n    @staticmethod\n    def itersplit(string: str) -> Iterable[Tuple[int, int]]:\n        sepiter = re.finditer(r\"(?<!\\\\),\", string)\n        start = 0\n        for match in sepiter:\n            yield start, match.start()\n            start = match.end()\n        # yield the rest if any\n        if start < len(string):\n            yield start, len(string)\n\n    def validate(self, string: str, pos: int) -> Tuple[QValidator.State, str, int]:\n        state = QValidator.Acceptable\n        # Matches non-complete intermediate numbers (while editing)\n        intermediate = re.compile(r\"([+-]?\\s?\\d*\\s?\\d*\\.?\\d*\\s?\\d*)\")\n        values = []\n        for start, end in self.itersplit(string):\n            valuestr = string[start:end].strip()\n            if not valuestr:\n                state = min(state, QValidator.Intermediate)\n                # Middle element is empty\n                continue\n            value = parse_float(valuestr)\n            if value is None:\n                if intermediate.fullmatch(valuestr):\n                    state = min(state, QValidator.Intermediate)\n                    continue\n                return QValidator.Invalid, string, pos\n            if values and value <= values[-1]:\n                state = min(state, QValidator.Intermediate)\n            else:\n                values.append(value)\n        return state, string, pos\n\n    def fixup(self, string):\n        # type: (str) -> str\n        \"\"\"\n        Fixup the input. Remove empty parts from the string.\n        \"\"\"\n        parts = [string[start: end] for start, end in self.itersplit(string)]\n        parts = [part for part in parts if part.strip()]\n        return \", \".join(parts)",
                            "ast_type_str": "ClassDef",
                            "start_lineno": 152,
                            "end_lineno": 207,
                            "parent": null
                        }
                    ],
                    "added_entities": [],
                    "deleted_entities": []
                }
            ]
        },
        {
            "old_file_content": "# Test methods with long descriptive names can omit docstrings\n# pylint: disable=missing-docstring,unsubscriptable-object,protected-access\nimport unittest\nfrom unittest.mock import Mock\n\nfrom Orange.data import Table\nfrom Orange.widgets.data.owdiscretize import OWDiscretize, Default, EqualFreq, \\\n    Remove, Leave, Custom, IncreasingNumbersListValidator\nfrom Orange.widgets.tests.base import WidgetTest\nfrom Orange.widgets.utils.state_summary import format_summary_details\nfrom Orange.widgets.utils.itemmodels import select_row\n\n\nclass TestOWDiscretize(WidgetTest):\n    def setUp(self):\n        super().setUp()\n        self.widget = self.create_widget(OWDiscretize)\n\n    def test_empty_data(self):\n        data = Table(\"iris\")\n        widget = self.widget\n        self.send_signal(self.widget.Inputs.data,\n                         Table.from_domain(data.domain))\n        for m in (OWDiscretize.Leave, OWDiscretize.MDL, OWDiscretize.EqualFreq,\n                  OWDiscretize.EqualWidth, OWDiscretize.Remove,\n                  OWDiscretize.Custom):\n            widget.default_method = m\n            widget.unconditional_commit()\n            self.assertIsNotNone(self.get_output(widget.Outputs.data))\n\n    def test_summary(self):\n        \"\"\"Check if status bar is updated when data is received\"\"\"\n        input_sum = self.widget.info.set_input_summary = Mock()\n        output_sum = self.widget.info.set_output_summary = Mock()\n\n        data = Table(\"iris\")\n        self.send_signal(self.widget.Inputs.data, data)\n        input_sum.assert_called_with(len(data), format_summary_details(data))\n        output = self.get_output(self.widget.Outputs.data)\n        output_sum.assert_called_with(len(output),\n                                      format_summary_details(output))\n\n        input_sum.reset_mock()\n        output_sum.reset_mock()\n        self.send_signal(self.widget.Inputs.data, None)\n        input_sum.assert_called_once()\n        self.assertEqual(input_sum.call_args[0][0].brief, \"\")\n        output_sum.assert_called_once()\n        self.assertEqual(output_sum.call_args[0][0].brief, \"\")\n\n    def test_select_method(self):\n        widget = self.widget\n        data = Table(\"iris\")[::5]\n        self.send_signal(self.widget.Inputs.data, data)\n\n        model = widget.varmodel\n        view = widget.varview\n        defbg = widget.default_button_group\n        varbg = widget.variable_button_group\n        self.assertSequenceEqual(list(model), data.domain.attributes)\n        defbg.button(OWDiscretize.EqualFreq).click()\n        self.assertEqual(widget.default_method, OWDiscretize.EqualFreq)\n        self.assertTrue(\n            all(isinstance(m, Default) and isinstance(m.method, EqualFreq)\n                for m in map(widget.method_for_index,\n                             range(len(data.domain.attributes)))))\n\n        # change method for first variable\n        select_row(view, 0)\n        varbg.button(OWDiscretize.Remove).click()\n        met = widget.method_for_index(0)\n        self.assertIsInstance(met, Remove)\n\n        # select a second var\n        selmodel = view.selectionModel()\n        selmodel.select(model.index(2), selmodel.Select)\n        # the current checked button must unset\n        self.assertEqual(varbg.checkedId(), -1)\n\n        varbg.button(OWDiscretize.Leave).click()\n        self.assertIsInstance(widget.method_for_index(0), Leave)\n        self.assertIsInstance(widget.method_for_index(2), Leave)\n        # reset both back to default\n        varbg.button(OWDiscretize.Default).click()\n        self.assertIsInstance(widget.method_for_index(0), Default)\n        self.assertIsInstance(widget.method_for_index(2), Default)\n\n    def test_migration(self):\n        w = self.create_widget(OWDiscretize, stored_settings={\n            \"default_method\": 0\n        })\n        self.assertEqual(w.default_method, OWDiscretize.Leave)\n\n    def test_manual_cuts_edit(self):\n        widget = self.widget\n        data = Table(\"iris\")[::5]\n        self.send_signal(self.widget.Inputs.data, data)\n        view = widget.varview\n        varbg = widget.variable_button_group\n        widget.set_default_method(OWDiscretize.Custom)\n        widget.default_cutpoints = (0, 2, 4)\n        ledit = widget.manual_cuts_edit\n        self.assertEqual(ledit.text(), \"0, 2, 4\")\n        ledit.setText(\"3, 4, 5\")\n        ledit.editingFinished.emit()\n        self.assertEqual(widget.default_cutpoints, (3, 4, 5))\n        self.assertEqual(widget._current_default_method(), Custom((3, 4, 5)))\n        self.assertTrue(\n            all(widget.method_for_index(i) == Default(Custom((3, 4, 5)))\n                for i in range(len(data.domain.attributes)))\n        )\n        select_row(view, 0)\n        varbg.button(OWDiscretize.Custom).click()\n        ledit = widget.manual_cuts_specific\n        ledit.setText(\"1, 2, 3\")\n        ledit.editingFinished.emit()\n        self.assertEqual(widget.method_for_index(0), Custom((1, 2, 3)))\n        ledit.setText(\"\")\n        ledit.editingFinished.emit()\n        self.assertEqual(widget.method_for_index(0), Custom(()))\n\n    def test_manual_cuts_copy(self):\n        widget = self.widget\n        data = Table(\"iris\")[::5]\n        self.send_signal(self.widget.Inputs.data, data)\n        view = widget.varview\n        select_row(view, 0)\n        varbg = widget.variable_button_group\n        varbg.button(OWDiscretize.EqualWidth).click()\n        v = widget.discretized_var(0)\n        points = tuple(v.compute_value.points)\n        cc_button = widget.copy_current_to_manual_button\n        cc_button.click()\n        self.assertEqual(widget.method_for_index(0), Custom(points))\n        self.assertEqual(varbg.checkedId(), OWDiscretize.Custom)\n\n\nclass TestValidator(unittest.TestCase):\n    def test_validate(self):\n        v = IncreasingNumbersListValidator()\n        self.assertEqual(v.validate(\"\", 0), (v.Acceptable, '', 0))\n        self.assertEqual(v.validate(\"1\", 1), (v.Acceptable, '1', 1))\n        self.assertEqual(v.validate(\",\", 0), (v.Intermediate, ',', 0))\n        self.assertEqual(v.validate(\"-\", 0), (v.Intermediate, '-', 0))\n        self.assertEqual(v.validate(\"1,,\", 1), (v.Intermediate, '1,,', 1))\n        self.assertEqual(v.validate(\"1,a,\", 1), (v.Invalid, '1,a,', 1))\n        self.assertEqual(v.validate(\"a\", 1), (v.Invalid, 'a', 1))\n        self.assertEqual(v.validate(\"1,1\", 0), (v.Intermediate, '1,1', 0))\n        self.assertEqual(v.validate(\"1,12\", 0), (v.Acceptable, '1,12', 0))\n\n    def test_fixup(self):\n        v = IncreasingNumbersListValidator()\n        self.assertEqual(v.fixup(\"\"), \"\")\n        self.assertEqual(v.fixup(\"1,,2\"), \"1, 2\")\n        self.assertEqual(v.fixup(\"1,,\"), \"1\")\n        self.assertEqual(v.fixup(\"1,\"), \"1\")\n        self.assertEqual(v.fixup(\",1\"), \"1\")\n        self.assertEqual(v.fixup(\",\"), \"\")\n",
            "new_file_content": "# Test methods with long descriptive names can omit docstrings\n# pylint: disable=missing-docstring,unsubscriptable-object,protected-access\nimport unittest\nfrom unittest.mock import Mock\n\nfrom Orange.data import Table\nfrom Orange.widgets.data.owdiscretize import OWDiscretize, Default, EqualFreq, \\\n    Remove, Leave, Custom, IncreasingNumbersListValidator\nfrom Orange.widgets.tests.base import WidgetTest\nfrom Orange.widgets.utils.state_summary import format_summary_details\nfrom Orange.widgets.utils.itemmodels import select_row\n\n\nclass TestOWDiscretize(WidgetTest):\n    def setUp(self):\n        super().setUp()\n        self.widget = self.create_widget(OWDiscretize)\n\n    def test_empty_data(self):\n        data = Table(\"iris\")\n        widget = self.widget\n        self.send_signal(self.widget.Inputs.data,\n                         Table.from_domain(data.domain))\n        for m in (OWDiscretize.Leave, OWDiscretize.MDL, OWDiscretize.EqualFreq,\n                  OWDiscretize.EqualWidth, OWDiscretize.Remove,\n                  OWDiscretize.Custom):\n            widget.default_method = m\n            widget.unconditional_commit()\n            self.assertIsNotNone(self.get_output(widget.Outputs.data))\n\n    def test_summary(self):\n        \"\"\"Check if status bar is updated when data is received\"\"\"\n        input_sum = self.widget.info.set_input_summary = Mock()\n        output_sum = self.widget.info.set_output_summary = Mock()\n\n        data = Table(\"iris\")\n        self.send_signal(self.widget.Inputs.data, data)\n        input_sum.assert_called_with(len(data), format_summary_details(data))\n        output = self.get_output(self.widget.Outputs.data)\n        output_sum.assert_called_with(len(output),\n                                      format_summary_details(output))\n\n        input_sum.reset_mock()\n        output_sum.reset_mock()\n        self.send_signal(self.widget.Inputs.data, None)\n        input_sum.assert_called_once()\n        self.assertEqual(input_sum.call_args[0][0].brief, \"\")\n        output_sum.assert_called_once()\n        self.assertEqual(output_sum.call_args[0][0].brief, \"\")\n\n    def test_select_method(self):\n        widget = self.widget\n        data = Table(\"iris\")[::5]\n        self.send_signal(self.widget.Inputs.data, data)\n\n        model = widget.varmodel\n        view = widget.varview\n        defbg = widget.default_button_group\n        varbg = widget.variable_button_group\n        self.assertSequenceEqual(list(model), data.domain.attributes)\n        defbg.button(OWDiscretize.EqualFreq).click()\n        self.assertEqual(widget.default_method, OWDiscretize.EqualFreq)\n        self.assertTrue(\n            all(isinstance(m, Default) and isinstance(m.method, EqualFreq)\n                for m in map(widget.method_for_index,\n                             range(len(data.domain.attributes)))))\n\n        # change method for first variable\n        select_row(view, 0)\n        varbg.button(OWDiscretize.Remove).click()\n        met = widget.method_for_index(0)\n        self.assertIsInstance(met, Remove)\n\n        # select a second var\n        selmodel = view.selectionModel()\n        selmodel.select(model.index(2), selmodel.Select)\n        # the current checked button must unset\n        self.assertEqual(varbg.checkedId(), -1)\n\n        varbg.button(OWDiscretize.Leave).click()\n        self.assertIsInstance(widget.method_for_index(0), Leave)\n        self.assertIsInstance(widget.method_for_index(2), Leave)\n        # reset both back to default\n        varbg.button(OWDiscretize.Default).click()\n        self.assertIsInstance(widget.method_for_index(0), Default)\n        self.assertIsInstance(widget.method_for_index(2), Default)\n\n    def test_migration(self):\n        w = self.create_widget(OWDiscretize, stored_settings={\n            \"default_method\": 0\n        })\n        self.assertEqual(w.default_method, OWDiscretize.Leave)\n\n    def test_manual_cuts_edit(self):\n        widget = self.widget\n        data = Table(\"iris\")[::5]\n        self.send_signal(self.widget.Inputs.data, data)\n        view = widget.varview\n        varbg = widget.variable_button_group\n        widget.set_default_method(OWDiscretize.Custom)\n        widget.default_cutpoints = (0, 2, 4)\n        ledit = widget.manual_cuts_edit\n        self.assertEqual(ledit.text(), \"0, 2, 4\")\n        ledit.setText(\"3, 4, 5\")\n        ledit.editingFinished.emit()\n        self.assertEqual(widget.default_cutpoints, (3, 4, 5))\n        self.assertEqual(widget._current_default_method(), Custom((3, 4, 5)))\n        self.assertTrue(\n            all(widget.method_for_index(i) == Default(Custom((3, 4, 5)))\n                for i in range(len(data.domain.attributes)))\n        )\n        select_row(view, 0)\n        varbg.button(OWDiscretize.Custom).click()\n        ledit = widget.manual_cuts_specific\n        ledit.setText(\"1, 2, 3\")\n        ledit.editingFinished.emit()\n        self.assertEqual(widget.method_for_index(0), Custom((1, 2, 3)))\n        ledit.setText(\"\")\n        ledit.editingFinished.emit()\n        self.assertEqual(widget.method_for_index(0), Custom(()))\n\n    def test_manual_cuts_copy(self):\n        widget = self.widget\n        data = Table(\"iris\")[::5]\n        self.send_signal(self.widget.Inputs.data, data)\n        view = widget.varview\n        select_row(view, 0)\n        varbg = widget.variable_button_group\n        varbg.button(OWDiscretize.EqualWidth).click()\n        v = widget.discretized_var(0)\n        points = tuple(v.compute_value.points)\n        cc_button = widget.copy_current_to_manual_button\n        cc_button.click()\n        self.assertEqual(widget.method_for_index(0), Custom(points))\n        self.assertEqual(varbg.checkedId(), OWDiscretize.Custom)\n\n\nclass TestValidator(unittest.TestCase):\n    def test_validate(self):\n        v = IncreasingNumbersListValidator()\n        self.assertEqual(v.validate(\"\", 0), (v.Acceptable, '', 0))\n        self.assertEqual(v.validate(\"1\", 1), (v.Acceptable, '1', 1))\n        self.assertEqual(v.validate(\",\", 0), (v.Acceptable, ',', 0))\n        self.assertEqual(v.validate(\"-\", 0), (v.Intermediate, '-', 0))\n        self.assertEqual(v.validate(\"1,,\", 1), (v.Acceptable, '1,,', 1))\n        self.assertEqual(v.validate(\"1,a,\", 1), (v.Invalid, '1,a,', 1))\n        self.assertEqual(v.validate(\"a\", 1), (v.Invalid, 'a', 1))\n        self.assertEqual(v.validate(\"1,1\", 0), (v.Intermediate, '1,1', 0))\n        self.assertEqual(v.validate(\"1,12\", 0), (v.Acceptable, '1,12', 0))\n\n    def test_fixup(self):\n        v = IncreasingNumbersListValidator()\n        self.assertEqual(v.fixup(\"\"), \"\")\n        self.assertEqual(v.fixup(\"1,,2\"), \"1, 2\")\n        self.assertEqual(v.fixup(\"1,,\"), \"1\")\n        self.assertEqual(v.fixup(\"1,\"), \"1\")\n        self.assertEqual(v.fixup(\",1\"), \"1\")\n        self.assertEqual(v.fixup(\",\"), \"\")\n",
            "header": {
                "file": {
                    "path": "Orange/widgets/data/tests/test_owdiscretize.py"
                },
                "misc_line": null
            },
            "index_line": {
                "old_commit_hash": "6350c8ad7",
                "new_commit_hash": "829d5beb7",
                "mode": "100644"
            },
            "is_binary_file": false,
            "binary_line": null,
            "minus_file": {
                "path": "a/Orange/widgets/data/tests/test_owdiscretize.py"
            },
            "plus_file": {
                "path": "b/Orange/widgets/data/tests/test_owdiscretize.py"
            },
            "hunks": [
                {
                    "descriptor": {
                        "old_range": {
                            "start": 140,
                            "length": 9
                        },
                        "new_range": {
                            "start": 140,
                            "length": 9
                        },
                        "section": "class TestValidator(unittest.TestCase):"
                    },
                    "line_group": {
                        "all_lines": [
                            {
                                "content": "        v = IncreasingNumbersListValidator()",
                                "type": "context"
                            },
                            {
                                "content": "        self.assertEqual(v.validate(\"\", 0), (v.Acceptable, '', 0))",
                                "type": "context"
                            },
                            {
                                "content": "        self.assertEqual(v.validate(\"1\", 1), (v.Acceptable, '1', 1))",
                                "type": "context"
                            },
                            {
                                "content": "        self.assertEqual(v.validate(\",\", 0), (v.Intermediate, ',', 0))",
                                "type": "deleted"
                            },
                            {
                                "content": "        self.assertEqual(v.validate(\",\", 0), (v.Acceptable, ',', 0))",
                                "type": "added"
                            },
                            {
                                "content": "        self.assertEqual(v.validate(\"-\", 0), (v.Intermediate, '-', 0))",
                                "type": "context"
                            },
                            {
                                "content": "        self.assertEqual(v.validate(\"1,,\", 1), (v.Intermediate, '1,,', 1))",
                                "type": "deleted"
                            },
                            {
                                "content": "        self.assertEqual(v.validate(\"1,,\", 1), (v.Acceptable, '1,,', 1))",
                                "type": "added"
                            },
                            {
                                "content": "        self.assertEqual(v.validate(\"1,a,\", 1), (v.Invalid, '1,a,', 1))",
                                "type": "context"
                            },
                            {
                                "content": "        self.assertEqual(v.validate(\"a\", 1), (v.Invalid, 'a', 1))",
                                "type": "context"
                            },
                            {
                                "content": "        self.assertEqual(v.validate(\"1,1\", 0), (v.Intermediate, '1,1', 0))",
                                "type": "context"
                            },
                            {
                                "content": "",
                                "type": "context"
                            }
                        ]
                    },
                    "modified_entities": [
                        {
                            "file_name": "Orange/widgets/data/tests/test_owdiscretize.py",
                            "type": "class",
                            "name": "TestValidator",
                            "content": "class TestValidator(unittest.TestCase):\n    def test_validate(self):\n        v = IncreasingNumbersListValidator()\n        self.assertEqual(v.validate(\"\", 0), (v.Acceptable, '', 0))\n        self.assertEqual(v.validate(\"1\", 1), (v.Acceptable, '1', 1))\n        self.assertEqual(v.validate(\",\", 0), (v.Intermediate, ',', 0))\n        self.assertEqual(v.validate(\"-\", 0), (v.Intermediate, '-', 0))\n        self.assertEqual(v.validate(\"1,,\", 1), (v.Intermediate, '1,,', 1))\n        self.assertEqual(v.validate(\"1,a,\", 1), (v.Invalid, '1,a,', 1))\n        self.assertEqual(v.validate(\"a\", 1), (v.Invalid, 'a', 1))\n        self.assertEqual(v.validate(\"1,1\", 0), (v.Intermediate, '1,1', 0))\n        self.assertEqual(v.validate(\"1,12\", 0), (v.Acceptable, '1,12', 0))\n\n    def test_fixup(self):\n        v = IncreasingNumbersListValidator()\n        self.assertEqual(v.fixup(\"\"), \"\")\n        self.assertEqual(v.fixup(\"1,,2\"), \"1, 2\")\n        self.assertEqual(v.fixup(\"1,,\"), \"1\")\n        self.assertEqual(v.fixup(\"1,\"), \"1\")\n        self.assertEqual(v.fixup(\",1\"), \"1\")\n        self.assertEqual(v.fixup(\",\"), \"\")",
                            "ast_type_str": "ClassDef",
                            "start_lineno": 138,
                            "end_lineno": 158,
                            "parent": null
                        },
                        {
                            "file_name": "Orange/widgets/data/tests/test_owdiscretize.py",
                            "type": "method",
                            "name": "TestValidator.test_validate",
                            "content": "class TestValidator(unittest.TestCase):\n    def test_validate(self):\n        v = IncreasingNumbersListValidator()\n        self.assertEqual(v.validate(\"\", 0), (v.Acceptable, '', 0))\n        self.assertEqual(v.validate(\"1\", 1), (v.Acceptable, '1', 1))\n        self.assertEqual(v.validate(\",\", 0), (v.Intermediate, ',', 0))\n        self.assertEqual(v.validate(\"-\", 0), (v.Intermediate, '-', 0))\n        self.assertEqual(v.validate(\"1,,\", 1), (v.Intermediate, '1,,', 1))\n        self.assertEqual(v.validate(\"1,a,\", 1), (v.Invalid, '1,a,', 1))\n        self.assertEqual(v.validate(\"a\", 1), (v.Invalid, 'a', 1))\n        self.assertEqual(v.validate(\"1,1\", 0), (v.Intermediate, '1,1', 0))\n        self.assertEqual(v.validate(\"1,12\", 0), (v.Acceptable, '1,12', 0))\n\n    def test_fixup(self):\n        v = IncreasingNumbersListValidator()\n        self.assertEqual(v.fixup(\"\"), \"\")\n        self.assertEqual(v.fixup(\"1,,2\"), \"1, 2\")\n        self.assertEqual(v.fixup(\"1,,\"), \"1\")\n        self.assertEqual(v.fixup(\"1,\"), \"1\")\n        self.assertEqual(v.fixup(\",1\"), \"1\")\n        self.assertEqual(v.fixup(\",\"), \"\")",
                            "ast_type_str": "ClassDef",
                            "start_lineno": 139,
                            "end_lineno": 149,
                            "parent": {
                                "file_name": "Orange/widgets/data/tests/test_owdiscretize.py",
                                "type": "class",
                                "name": "TestValidator",
                                "content": "class TestValidator(unittest.TestCase):\n    def test_validate(self):\n        v = IncreasingNumbersListValidator()\n        self.assertEqual(v.validate(\"\", 0), (v.Acceptable, '', 0))\n        self.assertEqual(v.validate(\"1\", 1), (v.Acceptable, '1', 1))\n        self.assertEqual(v.validate(\",\", 0), (v.Intermediate, ',', 0))\n        self.assertEqual(v.validate(\"-\", 0), (v.Intermediate, '-', 0))\n        self.assertEqual(v.validate(\"1,,\", 1), (v.Intermediate, '1,,', 1))\n        self.assertEqual(v.validate(\"1,a,\", 1), (v.Invalid, '1,a,', 1))\n        self.assertEqual(v.validate(\"a\", 1), (v.Invalid, 'a', 1))\n        self.assertEqual(v.validate(\"1,1\", 0), (v.Intermediate, '1,1', 0))\n        self.assertEqual(v.validate(\"1,12\", 0), (v.Acceptable, '1,12', 0))\n\n    def test_fixup(self):\n        v = IncreasingNumbersListValidator()\n        self.assertEqual(v.fixup(\"\"), \"\")\n        self.assertEqual(v.fixup(\"1,,2\"), \"1, 2\")\n        self.assertEqual(v.fixup(\"1,,\"), \"1\")\n        self.assertEqual(v.fixup(\"1,\"), \"1\")\n        self.assertEqual(v.fixup(\",1\"), \"1\")\n        self.assertEqual(v.fixup(\",\"), \"\")",
                                "ast_type_str": "ClassDef",
                                "start_lineno": 138,
                                "end_lineno": 158,
                                "parent": null
                            }
                        }
                    ],
                    "added_entities": [],
                    "deleted_entities": []
                }
            ]
        }
    ],
    "old_commit_hash": "964b6197e76ac970065bbc40485e28dbd963d62f^",
    "new_commit_hash": "964b6197e76ac970065bbc40485e28dbd963d62f",
    "commit_message": "owdiscretize: Accept empty parts",
    "commit_date": "2020-08-27T14:20:20+02:00",
    "metadata": {}
}
{
    "repo_name": "orange3",
    "new_commit_hash": "964b6197e76ac970065bbc40485e28dbd963d62f",
    "test_file_codes": [
        "# Test methods with long descriptive names can omit docstrings\n# pylint: disable=missing-docstring,unsubscriptable-object,protected-access\nimport unittest\nfrom unittest.mock import Mock\n\nfrom Orange.data import Table\nfrom Orange.widgets.data.owdiscretize import OWDiscretize, Default, EqualFreq, \\\n    Remove, Leave, Custom, IncreasingNumbersListValidator\nfrom Orange.widgets.tests.base import WidgetTest\nfrom Orange.widgets.utils.state_summary import format_summary_details\nfrom Orange.widgets.utils.itemmodels import select_row\n\n\nclass TestOWDiscretize(WidgetTest):\n    def setUp(self):\n        super().setUp()\n        self.widget = self.create_widget(OWDiscretize)\n\n    def test_empty_data(self):\n        data = Table(\"iris\")\n        widget = self.widget\n        self.send_signal(self.widget.Inputs.data,\n                         Table.from_domain(data.domain))\n        for m in (OWDiscretize.Leave, OWDiscretize.MDL, OWDiscretize.EqualFreq,\n                  OWDiscretize.EqualWidth, OWDiscretize.Remove,\n                  OWDiscretize.Custom):\n            widget.default_method = m\n            widget.unconditional_commit()\n            self.assertIsNotNone(self.get_output(widget.Outputs.data))\n\n    def test_summary(self):\n        \"\"\"Check if status bar is updated when data is received\"\"\"\n        input_sum = self.widget.info.set_input_summary = Mock()\n        output_sum = self.widget.info.set_output_summary = Mock()\n\n        data = Table(\"iris\")\n        self.send_signal(self.widget.Inputs.data, data)\n        input_sum.assert_called_with(len(data), format_summary_details(data))\n        output = self.get_output(self.widget.Outputs.data)\n        output_sum.assert_called_with(len(output),\n                                      format_summary_details(output))\n\n        input_sum.reset_mock()\n        output_sum.reset_mock()\n        self.send_signal(self.widget.Inputs.data, None)\n        input_sum.assert_called_once()\n        self.assertEqual(input_sum.call_args[0][0].brief, \"\")\n        output_sum.assert_called_once()\n        self.assertEqual(output_sum.call_args[0][0].brief, \"\")\n\n    def test_select_method(self):\n        widget = self.widget\n        data = Table(\"iris\")[::5]\n        self.send_signal(self.widget.Inputs.data, data)\n\n        model = widget.varmodel\n        view = widget.varview\n        defbg = widget.default_button_group\n        varbg = widget.variable_button_group\n        self.assertSequenceEqual(list(model), data.domain.attributes)\n        defbg.button(OWDiscretize.EqualFreq).click()\n        self.assertEqual(widget.default_method, OWDiscretize.EqualFreq)\n        self.assertTrue(\n            all(isinstance(m, Default) and isinstance(m.method, EqualFreq)\n                for m in map(widget.method_for_index,\n                             range(len(data.domain.attributes)))))\n\n        # change method for first variable\n        select_row(view, 0)\n        varbg.button(OWDiscretize.Remove).click()\n        met = widget.method_for_index(0)\n        self.assertIsInstance(met, Remove)\n\n        # select a second var\n        selmodel = view.selectionModel()\n        selmodel.select(model.index(2), selmodel.Select)\n        # the current checked button must unset\n        self.assertEqual(varbg.checkedId(), -1)\n\n        varbg.button(OWDiscretize.Leave).click()\n        self.assertIsInstance(widget.method_for_index(0), Leave)\n        self.assertIsInstance(widget.method_for_index(2), Leave)\n        # reset both back to default\n        varbg.button(OWDiscretize.Default).click()\n        self.assertIsInstance(widget.method_for_index(0), Default)\n        self.assertIsInstance(widget.method_for_index(2), Default)\n\n    def test_migration(self):\n        w = self.create_widget(OWDiscretize, stored_settings={\n            \"default_method\": 0\n        })\n        self.assertEqual(w.default_method, OWDiscretize.Leave)\n\n    def test_manual_cuts_edit(self):\n        widget = self.widget\n        data = Table(\"iris\")[::5]\n        self.send_signal(self.widget.Inputs.data, data)\n        view = widget.varview\n        varbg = widget.variable_button_group\n        widget.set_default_method(OWDiscretize.Custom)\n        widget.default_cutpoints = (0, 2, 4)\n        ledit = widget.manual_cuts_edit\n        self.assertEqual(ledit.text(), \"0, 2, 4\")\n        ledit.setText(\"3, 4, 5\")\n        ledit.editingFinished.emit()\n        self.assertEqual(widget.default_cutpoints, (3, 4, 5))\n        self.assertEqual(widget._current_default_method(), Custom((3, 4, 5)))\n        self.assertTrue(\n            all(widget.method_for_index(i) == Default(Custom((3, 4, 5)))\n                for i in range(len(data.domain.attributes)))\n        )\n        select_row(view, 0)\n        varbg.button(OWDiscretize.Custom).click()\n        ledit = widget.manual_cuts_specific\n        ledit.setText(\"1, 2, 3\")\n        ledit.editingFinished.emit()\n        self.assertEqual(widget.method_for_index(0), Custom((1, 2, 3)))\n        ledit.setText(\"\")\n        ledit.editingFinished.emit()\n        self.assertEqual(widget.method_for_index(0), Custom(()))\n\n    def test_manual_cuts_copy(self):\n        widget = self.widget\n        data = Table(\"iris\")[::5]\n        self.send_signal(self.widget.Inputs.data, data)\n        view = widget.varview\n        select_row(view, 0)\n        varbg = widget.variable_button_group\n        varbg.button(OWDiscretize.EqualWidth).click()\n        v = widget.discretized_var(0)\n        points = tuple(v.compute_value.points)\n        cc_button = widget.copy_current_to_manual_button\n        cc_button.click()\n        self.assertEqual(widget.method_for_index(0), Custom(points))\n        self.assertEqual(varbg.checkedId(), OWDiscretize.Custom)\n\n\nclass TestValidator(unittest.TestCase):\n    def test_validate(self):\n        v = IncreasingNumbersListValidator()\n        self.assertEqual(v.validate(\"\", 0), (v.Acceptable, '', 0))\n        self.assertEqual(v.validate(\"1\", 1), (v.Acceptable, '1', 1))\n        self.assertEqual(v.validate(\",\", 0), (v.Acceptable, ',', 0))\n        self.assertEqual(v.validate(\"-\", 0), (v.Intermediate, '-', 0))\n        self.assertEqual(v.validate(\"1,,\", 1), (v.Acceptable, '1,,', 1))\n        self.assertEqual(v.validate(\"1,a,\", 1), (v.Invalid, '1,a,', 1))\n        self.assertEqual(v.validate(\"a\", 1), (v.Invalid, 'a', 1))\n        self.assertEqual(v.validate(\"1,1\", 0), (v.Intermediate, '1,1', 0))\n        self.assertEqual(v.validate(\"1,12\", 0), (v.Acceptable, '1,12', 0))\n\n    def test_fixup(self):\n        v = IncreasingNumbersListValidator()\n        self.assertEqual(v.fixup(\"\"), \"\")\n        self.assertEqual(v.fixup(\"1,,2\"), \"1, 2\")\n        self.assertEqual(v.fixup(\"1,,\"), \"1\")\n        self.assertEqual(v.fixup(\"1,\"), \"1\")\n        self.assertEqual(v.fixup(\",1\"), \"1\")\n        self.assertEqual(v.fixup(\",\"), \"\")\n"
    ],
    "test_file_names": [
        "test_1.py"
    ],
    "setup_res_code": 0,
    "setup_res_stdout": "Starting Orange installation attempts...\nAttempting installation with Python 3.7...\nrunning build_ext\nrunning build_src\nbuild_src\nbuilding extension \"Orange.classification._simple_tree\" sources\nbuilding extension \"Orange.classification._tree_scorers\" sources\nbuilding extension \"Orange.data._valuecount\" sources\nbuilding extension \"Orange.data._contingency\" sources\nbuilding extension \"Orange.data._io\" sources\nbuilding extension \"Orange.data._variable\" sources\nbuilding extension \"Orange.distance._distance\" sources\nbuilding extension \"Orange.preprocess._discretize\" sources\nbuilding extension \"Orange.preprocess._relieff\" sources\nbuilding extension \"Orange.projection._som\" sources\nbuilding extension \"Orange.widgets.utils._grid_density\" sources\nbuild_src: building npy-pkg config files\ncustomize UnixCCompiler\nC compiler: cc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tools/deps/include -I/tools/deps/include/ncursesw -fPIC\n\ncreating /tmp/tmpl3n9n8an/tmp\ncreating /tmp/tmpl3n9n8an/tmp/tmpl3n9n8an\ncompile options: '-MMD -MF /tmp/tmpl3n9n8an/file.c.d -c'\ncc: /tmp/tmpl3n9n8an/file.c\ncustomize UnixCCompiler using build_ext\ncustomize UnixCCompiler\nC compiler: cc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tools/deps/include -I/tools/deps/include/ncursesw -fPIC\n\ncreating /tmp/tmppehxe6ku/tmp\ncreating /tmp/tmppehxe6ku/tmp/tmppehxe6ku\ncompile options: '-MMD -MF /tmp/tmppehxe6ku/file.c.d -c'\ncc: /tmp/tmppehxe6ku/file.c\ncustomize UnixCCompiler using build_ext\nbuilding 'Orange.classification._simple_tree' extension\ncompiling C sources\nC compiler: cc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tools/deps/include -I/tools/deps/include/ncursesw -fPIC\n\ncreating build/temp.linux-x86_64-3.7/Orange\ncreating build/temp.linux-x86_64-3.7/Orange/classification\ncompile options: '-I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/include -I/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/include/python3.7m -c'\ncc: Orange/classification/_simple_tree.c\ncc -pthread -shared -L/tools/deps/lib build/temp.linux-x86_64-3.7/Orange/classification/_simple_tree.o -L/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/lib -lm -lpython3.7m -o Orange/classification/_simple_tree.cpython-37m-x86_64-linux-gnu.so\nbuilding 'Orange.classification._tree_scorers' extension\ncompiling C sources\nC compiler: cc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tools/deps/include -I/tools/deps/include/ncursesw -fPIC\n\ncompile options: '-I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/include -I/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/include/python3.7m -c'\ncc: Orange/classification/_tree_scorers.c\ncc -pthread -shared -L/tools/deps/lib build/temp.linux-x86_64-3.7/Orange/classification/_tree_scorers.o -L/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/lib -lm -lpython3.7m -o Orange/classification/_tree_scorers.cpython-37m-x86_64-linux-gnu.so\nbuilding 'Orange.data._valuecount' extension\ncompiling C sources\nC compiler: cc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tools/deps/include -I/tools/deps/include/ncursesw -fPIC\n\ncreating build/temp.linux-x86_64-3.7/Orange/data\ncompile options: '-I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/include -I/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/include/python3.7m -c'\ncc: Orange/data/_valuecount.c\ncc -pthread -shared -L/tools/deps/lib build/temp.linux-x86_64-3.7/Orange/data/_valuecount.o -L/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/lib -lm -lpython3.7m -o Orange/data/_valuecount.cpython-37m-x86_64-linux-gnu.so\nbuilding 'Orange.data._contingency' extension\ncompiling C sources\nC compiler: cc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tools/deps/include -I/tools/deps/include/ncursesw -fPIC\n\ncompile options: '-I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/include -I/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/include/python3.7m -c'\ncc: Orange/data/_contingency.c\ncc -pthread -shared -L/tools/deps/lib build/temp.linux-x86_64-3.7/Orange/data/_contingency.o -L/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/lib -lm -lpython3.7m -o Orange/data/_contingency.cpython-37m-x86_64-linux-gnu.so\nbuilding 'Orange.data._io' extension\ncompiling C sources\nC compiler: cc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tools/deps/include -I/tools/deps/include/ncursesw -fPIC\n\ncompile options: '-I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/include -I/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/include/python3.7m -c'\ncc: Orange/data/_io.c\ncc -pthread -shared -L/tools/deps/lib build/temp.linux-x86_64-3.7/Orange/data/_io.o -L/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/lib -lm -lpython3.7m -o Orange/data/_io.cpython-37m-x86_64-linux-gnu.so\nbuilding 'Orange.data._variable' extension\ncompiling C sources\nC compiler: cc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tools/deps/include -I/tools/deps/include/ncursesw -fPIC\n\ncompile options: '-I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/include -I/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/include/python3.7m -c'\ncc: Orange/data/_variable.c\ncc -pthread -shared -L/tools/deps/lib build/temp.linux-x86_64-3.7/Orange/data/_variable.o -L/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/lib -lm -lpython3.7m -o Orange/data/_variable.cpython-37m-x86_64-linux-gnu.so\nbuilding 'Orange.distance._distance' extension\ncompiling C sources\nC compiler: cc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tools/deps/include -I/tools/deps/include/ncursesw -fPIC\n\ncreating build/temp.linux-x86_64-3.7/Orange/distance\ncompile options: '-I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/include -I/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/include/python3.7m -c'\ncc: Orange/distance/_distance.c\ncc -pthread -shared -L/tools/deps/lib build/temp.linux-x86_64-3.7/Orange/distance/_distance.o -L/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/lib -lm -lpython3.7m -o Orange/distance/_distance.cpython-37m-x86_64-linux-gnu.so\nbuilding 'Orange.preprocess._discretize' extension\ncompiling C sources\nC compiler: cc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tools/deps/include -I/tools/deps/include/ncursesw -fPIC\n\ncreating build/temp.linux-x86_64-3.7/Orange/preprocess\ncompile options: '-I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/include -I/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/include/python3.7m -c'\ncc: Orange/preprocess/_discretize.c\ncc -pthread -shared -L/tools/deps/lib build/temp.linux-x86_64-3.7/Orange/preprocess/_discretize.o -L/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/lib -lm -lpython3.7m -o Orange/preprocess/_discretize.cpython-37m-x86_64-linux-gnu.so\nbuilding 'Orange.preprocess._relieff' extension\ncompiling C++ sources\nC compiler: c++ -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tools/deps/include -I/tools/deps/include/ncursesw -fPIC\n\ncompile options: '-I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/include -I/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/include/python3.7m -c'\nc++: Orange/preprocess/_relieff.cpp\nc++ -pthread -shared -L/tools/deps/lib build/temp.linux-x86_64-3.7/Orange/preprocess/_relieff.o -L/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/lib -lm -lpython3.7m -o Orange/preprocess/_relieff.cpython-37m-x86_64-linux-gnu.so\nbuilding 'Orange.projection._som' extension\ncompiling C sources\nC compiler: cc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tools/deps/include -I/tools/deps/include/ncursesw -fPIC\n\ncreating build/temp.linux-x86_64-3.7/Orange/projection\ncompile options: '-I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/include -I/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/include/python3.7m -c'\ncc: Orange/projection/_som.c\ncc -pthread -shared -L/tools/deps/lib build/temp.linux-x86_64-3.7/Orange/projection/_som.o -L/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/lib -lm -lpython3.7m -o Orange/projection/_som.cpython-37m-x86_64-linux-gnu.so\nbuilding 'Orange.widgets.utils._grid_density' extension\ncompiling C++ sources\nC compiler: c++ -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tools/deps/include -I/tools/deps/include/ncursesw -fPIC\n\ncreating build/temp.linux-x86_64-3.7/Orange/widgets\ncreating build/temp.linux-x86_64-3.7/Orange/widgets/utils\ncompile options: '-I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/include -I/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/include/python3.7m -c'\nc++: Orange/widgets/utils/_grid_density.cpp\nc++ -pthread -shared -L/tools/deps/lib build/temp.linux-x86_64-3.7/Orange/widgets/utils/_grid_density.o -L/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/lib -lm -lpython3.7m -o Orange/widgets/utils/_grid_density.cpython-37m-x86_64-linux-gnu.so\nrunning develop\nrunning build_scripts\nrunning egg_info\nrunning build_src\nbuild_src\nbuilding extension \"Orange.classification._simple_tree\" sources\nbuilding extension \"Orange.classification._tree_scorers\" sources\nbuilding extension \"Orange.data._valuecount\" sources\nbuilding extension \"Orange.data._contingency\" sources\nbuilding extension \"Orange.data._io\" sources\nbuilding extension \"Orange.data._variable\" sources\nbuilding extension \"Orange.distance._distance\" sources\nbuilding extension \"Orange.preprocess._discretize\" sources\nbuilding extension \"Orange.preprocess._relieff\" sources\nbuilding extension \"Orange.projection._som\" sources\nbuilding extension \"Orange.widgets.utils._grid_density\" sources\nbuild_src: building npy-pkg config files\ncreating Orange3.egg-info\nwriting Orange3.egg-info/PKG-INFO\nwriting dependency_links to Orange3.egg-info/dependency_links.txt\nwriting entry points to Orange3.egg-info/entry_points.txt\nwriting requirements to Orange3.egg-info/requires.txt\nwriting top-level names to Orange3.egg-info/top_level.txt\nwriting manifest file 'Orange3.egg-info/SOURCES.txt'\nreading manifest file 'Orange3.egg-info/SOURCES.txt'\nreading manifest template 'MANIFEST.in'\nwarning: no files found matching 'README*' under directory 'Orange'\nwarning: no files found matching 'LICENSE' under directory 'Orange'\nwarning: no files found matching '*.basket' under directory 'Orange/datasets'\nwarning: no files found matching '*.js' under directory 'Orange/widgets'\nwarning: no files found matching '*.css' under directory 'Orange/widgets'\nwarning: no files found matching '*.html' under directory 'Orange/widgets'\nwarning: no files found matching 'COPYING'\nadding license file 'LICENSE'\nwriting manifest file 'Orange3.egg-info/SOURCES.txt'\nrunning build_ext\ncustomize UnixCCompiler\nC compiler: cc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tools/deps/include -I/tools/deps/include/ncursesw -fPIC\n\ncreating /tmp/tmp7v9znv40/tmp\ncreating /tmp/tmp7v9znv40/tmp/tmp7v9znv40\ncompile options: '-MMD -MF /tmp/tmp7v9znv40/file.c.d -c'\ncc: /tmp/tmp7v9znv40/file.c\ncustomize UnixCCompiler using build_ext\ncustomize UnixCCompiler\nC compiler: cc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tools/deps/include -I/tools/deps/include/ncursesw -fPIC\n\ncreating /tmp/tmpinn59op2/tmp\ncreating /tmp/tmpinn59op2/tmp/tmpinn59op2\ncompile options: '-MMD -MF /tmp/tmpinn59op2/file.c.d -c'\ncc: /tmp/tmpinn59op2/file.c\ncustomize UnixCCompiler using build_ext\nCreating /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages/Orange3.egg-link (link to .)\nAdding Orange3 3.27.0.dev0+964b619 to easy-install.pth file\nInstalling orange-canvas script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/bin\n\nInstalled /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f\nProcessing dependencies for Orange3==3.27.0.dev0+964b619\nSearching for XlsxWriter==3.2.0\nBest match: XlsxWriter 3.2.0\nAdding XlsxWriter 3.2.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for xlrd==2.0.1\nBest match: xlrd 2.0.1\nAdding xlrd 2.0.1 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for setuptools==59.8.0\nBest match: setuptools 59.8.0\nAdding setuptools 59.8.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for serverfiles==0.3.1\nBest match: serverfiles 0.3.1\nAdding serverfiles 0.3.1 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for scipy==1.7.3\nBest match: scipy 1.7.3\nAdding scipy 1.7.3 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for scikit-learn==1.0.2\nBest match: scikit-learn 1.0.2\nAdding scikit-learn 1.0.2 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for requests==2.31.0\nBest match: requests 2.31.0\nAdding requests 2.31.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for PyYAML==6.0.1\nBest match: PyYAML 6.0.1\nAdding PyYAML 6.0.1 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for python-louvain==0.16\nBest match: python-louvain 0.16\nAdding python-louvain 0.16 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for pyqtgraph==0.12.4\nBest match: pyqtgraph 0.12.4\nAdding pyqtgraph 0.12.4 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for pip==24.0\nBest match: pip 24.0\nAdding pip 24.0 to easy-install.pth file\nInstalling pip script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/bin\nInstalling pip3 script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/bin\nInstalling pip3.10 script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/bin\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for pandas==1.3.5\nBest match: pandas 1.3.5\nAdding pandas 1.3.5 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for orange-widget-base==4.22.0\nBest match: orange-widget-base 4.22.0\nAdding orange-widget-base 4.22.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for orange-canvas-core==0.1.35\nBest match: orange-canvas-core 0.1.35\nAdding orange-canvas-core 0.1.35 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for openpyxl==3.1.3\nBest match: openpyxl 3.1.3\nAdding openpyxl 3.1.3 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for openTSNE==1.0.1\nBest match: openTSNE 1.0.1\nAdding openTSNE 1.0.1 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for numpy==1.17.5\nBest match: numpy 1.17.5\nAdding numpy 1.17.5 to easy-install.pth file\nInstalling f2py script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/bin\nInstalling f2py3 script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/bin\nInstalling f2py3.7 script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/bin\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for networkx==2.6.3\nBest match: networkx 2.6.3\nAdding networkx 2.6.3 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for matplotlib==3.5.3\nBest match: matplotlib 3.5.3\nAdding matplotlib 3.5.3 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for keyrings.alt==4.2.0\nBest match: keyrings.alt 4.2.0\nAdding keyrings.alt 4.2.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for keyring==24.1.1\nBest match: keyring 24.1.1\nAdding keyring 24.1.1 to easy-install.pth file\nInstalling keyring script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/bin\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for joblib==1.3.2\nBest match: joblib 1.3.2\nAdding joblib 1.3.2 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for httpx==0.14.3\nBest match: httpx 0.14.3\nAdding httpx 0.14.3 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for docutils==0.20.1\nBest match: docutils 0.20.1\nAdding docutils 0.20.1 to easy-install.pth file\nInstalling docutils script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/bin\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for chardet==3.0.4\nBest match: chardet 3.0.4\nAdding chardet 3.0.4 to easy-install.pth file\nInstalling chardetect script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/bin\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for Bottleneck==1.4.0\nBest match: Bottleneck 1.4.0\nAdding Bottleneck 1.4.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for baycomp==1.0.3\nBest match: baycomp 1.0.3\nAdding baycomp 1.0.3 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for PyQtWebEngine==5.15.6\nBest match: PyQtWebEngine 5.15.6\nAdding PyQtWebEngine 5.15.6 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for PyQt5==5.15.10\nBest match: PyQt5 5.15.10\nAdding PyQt5 5.15.10 to easy-install.pth file\nInstalling pylupdate5 script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/bin\nInstalling pyrcc5 script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/bin\nInstalling pyuic5 script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/bin\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for AnyQt==0.2.0\nBest match: AnyQt 0.2.0\nAdding AnyQt 0.2.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for threadpoolctl==3.1.0\nBest match: threadpoolctl 3.1.0\nAdding threadpoolctl 3.1.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for idna==3.10\nBest match: idna 3.10\nAdding idna 3.10 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for charset-normalizer==3.4.1\nBest match: charset-normalizer 3.4.1\nAdding charset-normalizer 3.4.1 to easy-install.pth file\nInstalling normalizer script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/bin\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for urllib3==2.0.7\nBest match: urllib3 2.0.7\nAdding urllib3 2.0.7 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for certifi==2024.12.14\nBest match: certifi 2024.12.14\nAdding certifi 2024.12.14 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for python-dateutil==2.9.0.post0\nBest match: python-dateutil 2.9.0.post0\nAdding python-dateutil 2.9.0.post0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for pytz==2024.2\nBest match: pytz 2024.2\nAdding pytz 2024.2 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for typing-extensions==4.7.1\nBest match: typing-extensions 4.7.1\nAdding typing-extensions 4.7.1 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for packaging==24.0\nBest match: packaging 24.0\nAdding packaging 24.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for commonmark==0.9.1\nBest match: commonmark 0.9.1\nAdding commonmark 0.9.1 to easy-install.pth file\nInstalling cmark script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/bin\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for requests-cache==1.1.1\nBest match: requests-cache 1.1.1\nAdding requests-cache 1.1.1 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for importlib-metadata==6.7.0\nBest match: importlib-metadata 6.7.0\nAdding importlib-metadata 6.7.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for qasync==0.25.0\nBest match: qasync 0.25.0\nAdding qasync 0.25.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for dictdiffer==0.9.0\nBest match: dictdiffer 0.9.0\nAdding dictdiffer 0.9.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for et-xmlfile==1.1.0\nBest match: et-xmlfile 1.1.0\nAdding et-xmlfile 1.1.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for pyparsing==3.1.4\nBest match: pyparsing 3.1.4\nAdding pyparsing 3.1.4 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for kiwisolver==1.4.5\nBest match: kiwisolver 1.4.5\nAdding kiwisolver 1.4.5 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for Pillow==9.5.0\nBest match: Pillow 9.5.0\nAdding Pillow 9.5.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for fonttools==4.38.0\nBest match: fonttools 4.38.0\nAdding fonttools 4.38.0 to easy-install.pth file\nInstalling fonttools script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/bin\nInstalling pyftmerge script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/bin\nInstalling pyftsubset script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/bin\nInstalling ttx script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/bin\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for cycler==0.11.0\nBest match: cycler 0.11.0\nAdding cycler 0.11.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for jaraco.classes==3.2.3\nBest match: jaraco.classes 3.2.3\nAdding jaraco.classes 3.2.3 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for importlib-resources==5.12.0\nBest match: importlib-resources 5.12.0\nAdding importlib-resources 5.12.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for SecretStorage==3.3.3\nBest match: SecretStorage 3.3.3\nAdding SecretStorage 3.3.3 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for jeepney==0.8.0\nBest match: jeepney 0.8.0\nAdding jeepney 0.8.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for rfc3986==1.5.0\nBest match: rfc3986 1.5.0\nAdding rfc3986 1.5.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for sniffio==1.3.1\nBest match: sniffio 1.3.1\nAdding sniffio 1.3.1 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for httpcore==0.10.2\nBest match: httpcore 0.10.2\nAdding httpcore 0.10.2 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for PyQtWebEngine-Qt5==5.15.16\nBest match: PyQtWebEngine-Qt5 5.15.16\nAdding PyQtWebEngine-Qt5 5.15.16 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for PyQt5-sip==12.13.0\nBest match: PyQt5-sip 12.13.0\nAdding PyQt5-sip 12.13.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for PyQt5-Qt5==5.15.16\nBest match: PyQt5-Qt5 5.15.16\nAdding PyQt5-Qt5 5.15.16 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for six==1.17.0\nBest match: six 1.17.0\nAdding six 1.17.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for platformdirs==4.0.0\nBest match: platformdirs 4.0.0\nAdding platformdirs 4.0.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for url-normalize==1.4.3\nBest match: url-normalize 1.4.3\nAdding url-normalize 1.4.3 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for cattrs==23.1.2\nBest match: cattrs 23.1.2\nAdding cattrs 23.1.2 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for attrs==24.2.0\nBest match: attrs 24.2.0\nAdding attrs 24.2.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for zipp==3.15.0\nBest match: zipp 3.15.0\nAdding zipp 3.15.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for more-itertools==9.1.0\nBest match: more-itertools 9.1.0\nAdding more-itertools 9.1.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for cryptography==44.0.0\nBest match: cryptography 44.0.0\nAdding cryptography 44.0.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for h11==0.9.0\nBest match: h11 0.9.0\nAdding h11 0.9.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for exceptiongroup==1.2.2\nBest match: exceptiongroup 1.2.2\nAdding exceptiongroup 1.2.2 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for cffi==1.15.1\nBest match: cffi 1.15.1\nAdding cffi 1.15.1 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nSearching for pycparser==2.21\nBest match: pycparser 2.21\nAdding pycparser 2.21 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages\nFinished processing dependencies for Orange3==3.27.0.dev0+964b619\nVerifying Orange installation...\n✅ Orange installation successful!\nSuccessfully installed orange using Python 3.7\n",
    "setup_res_stderr": "Using CPython 3.7.9\nCreating virtual environment at: .venv\nActivate with: source .venv/bin/activate\nResolved 18 packages in 168ms\nPrepared 18 packages in 4ms\nInstalled 18 packages in 668ms\n + cython==0.29.37\n + exceptiongroup==1.2.2\n + importlib-metadata==6.7.0\n + iniconfig==2.0.0\n + numpy==1.17.5\n + packaging==24.0\n + pluggy==1.2.0\n + pyqt5==5.15.10\n + pyqt5-qt5==5.15.16\n + pyqt5-sip==12.13.0\n + pyqtwebengine==5.15.6\n + pyqtwebengine-qt5==5.15.16\n + pytest==7.4.4\n + setuptools==59.8.0\n + tomli==2.0.1\n + typing-extensions==4.7.1\n + wheel==0.42.0\n + zipp==3.15.0\nResolved 53 packages in 229ms\nInstalled 47 packages in 382ms\n + baycomp==1.0.3\n + bottleneck==1.4.0\n + certifi==2024.12.14\n + cffi==1.15.1\n + chardet==3.0.4\n + charset-normalizer==3.4.1\n + cryptography==44.0.0\n + cycler==0.11.0\n + et-xmlfile==1.1.0\n + fonttools==4.38.0\n + h11==0.9.0\n + httpcore==0.10.2\n + httpx==0.14.3\n + idna==3.10\n + importlib-resources==5.12.0\n + jaraco-classes==3.2.3\n + jeepney==0.8.0\n + joblib==1.3.2\n + keyring==24.1.1\n + keyrings-alt==4.2.0\n + kiwisolver==1.4.5\n + matplotlib==3.5.3\n + more-itertools==9.1.0\n + networkx==2.6.3\n + openpyxl==3.1.3\n + opentsne==1.0.1\n + pandas==1.3.5\n + pillow==9.5.0\n + pip==24.0\n + pycparser==2.21\n + pyparsing==3.1.4\n + python-dateutil==2.9.0.post0\n + python-louvain==0.16\n + pytz==2024.2\n + pyyaml==6.0.1\n + requests==2.31.0\n + rfc3986==1.5.0\n + scikit-learn==1.0.2\n + scipy==1.7.3\n + secretstorage==3.3.3\n + serverfiles==0.3.1\n + six==1.17.0\n + sniffio==1.3.1\n + threadpoolctl==3.1.0\n + urllib3==2.0.7\n + xlrd==2.0.1\n + xlsxwriter==3.2.0\nResolved 39 packages in 61ms\nInstalled 13 packages in 106ms\n + anyqt==0.2.0\n + attrs==24.2.0\n + cattrs==23.1.2\n + commonmark==0.9.1\n + dictdiffer==0.9.0\n + docutils==0.20.1\n + orange-canvas-core==0.1.35\n + orange-widget-base==4.22.0\n + platformdirs==4.0.0\n + pyqtgraph==0.12.4\n + qasync==0.25.0\n + requests-cache==1.1.1\n + url-normalize==1.4.3\nResolved 2 packages in 3ms\nInstalled 2 packages in 83ms\n + psycopg2==2.9.9\n + pymssql==2.3.2\nAudited 1 package in 21ms\nAudited 2 packages in 1ms\nOrange/classification/_simple_tree.c: In function ‘gain_ratio_c’:\nOrange/classification/_simple_tree.c:63:9: warning: implicit declaration of function ‘qsort_r’; did you mean ‘qsort’? [-Wimplicit-function-declaration]\n   63 |         qsort_r(base, nel, size, compar, thunk)\n      |         ^~~~~~~\nOrange/classification/_simple_tree.c:147:9: note: in expansion of macro ‘QSORT_R_FUNC’\n  147 |         QSORT_R_FUNC(examples, size, sizeof(struct Example), (void*) &compar_attr, compar_examples);\n      |         ^~~~~~~~~~~~\nIn file included from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1830,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,\n                 from Orange/classification/_tree_scorers.c:567:\n/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning \"Using deprecated NumPy API, disable it with \" \"#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION\" [-Wcpp]\n   17 | #warning \"Using deprecated NumPy API, disable it with \" \\\n      |  ^~~~~~~\nOrange/classification/_tree_scorers.c: In function ‘__pyx_pf_6Orange_14classification_13_tree_scorers_2find_threshold_entropy’:\nOrange/classification/_tree_scorers.c:3115:27: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Wsign-compare]\n 3115 |   __pyx_t_7 = ((__pyx_v_N <= __pyx_v_min_leaf) != 0);\n      |                           ^~\nOrange/classification/_tree_scorers.c: In function ‘__pyx_pf_6Orange_14classification_13_tree_scorers_6find_threshold_MSE’:\nOrange/classification/_tree_scorers.c:4619:27: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Wsign-compare]\n 4619 |   __pyx_t_1 = ((__pyx_v_N <= __pyx_v_min_leaf) != 0);\n      |                           ^~\nOrange/classification/_tree_scorers.c: In function ‘__pyx_pf_6Orange_14classification_13_tree_scorers_8find_binarization_MSE’:\nOrange/classification/_tree_scorers.c:5396:43: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Wsign-compare]\n 5396 |           for (__pyx_t_22 = 0; __pyx_t_22 < __pyx_t_21; __pyx_t_22+=1) {\n      |                                           ^\nOrange/classification/_tree_scorers.c:5517:39: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Wsign-compare]\n 5517 |           __pyx_t_27 = ((__pyx_v_left >= __pyx_v_min_leaf) != 0);\n      |                                       ^~\nOrange/classification/_tree_scorers.c:5523:53: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Wsign-compare]\n 5523 |           __pyx_t_27 = (((__pyx_v_N - __pyx_v_left) >= __pyx_v_min_leaf) != 0);\n      |                                                     ^~\nOrange/classification/_tree_scorers.c: In function ‘__pyx_pf_6Orange_14classification_13_tree_scorers_14compute_predictions_csr’:\nOrange/classification/_tree_scorers.c:7051:41: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Wsign-compare]\n 7051 |         for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {\n      |                                         ^\nOrange/classification/_tree_scorers.c: In function ‘__pyx_pf_6Orange_14classification_13_tree_scorers_16compute_predictions_csc’:\nOrange/classification/_tree_scorers.c:7741:41: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Wsign-compare]\n 7741 |         for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {\n      |                                         ^\nOrange/classification/_tree_scorers.c:7801:143: warning: comparison of integer expressions of different signedness: ‘__pyx_t_5numpy_int32_t’ {aka ‘int’} and ‘unsigned int’ [-Wsign-compare]\n 7801 |               __pyx_t_17 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_indices.data + __pyx_t_18 * __pyx_v_indices.strides[0]) ))) != __pyx_v_i) != 0);\n      |                                                                                                                                               ^~\nIn file included from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1830,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,\n                 from Orange/data/_valuecount.c:567:\n/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning \"Using deprecated NumPy API, disable it with \" \"#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION\" [-Wcpp]\n   17 | #warning \"Using deprecated NumPy API, disable it with \" \\\n      |  ^~~~~~~\nIn file included from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1830,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,\n                 from Orange/data/_contingency.c:598:\n/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning \"Using deprecated NumPy API, disable it with \" \"#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION\" [-Wcpp]\n   17 | #warning \"Using deprecated NumPy API, disable it with \" \\\n      |  ^~~~~~~\nOrange/data/_io.c: In function ‘__pyx_pf_6Orange_4data_3_io_sparse_read_float.constprop’:\nOrange/data/_io.c:3881:24: warning: ‘__pyx_v_decs’ may be used uninitialized in this function [-Wmaybe-uninitialized]\n 3881 |           __pyx_v_decs = (__pyx_v_decs / 10.0);\n      |           ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~\nOrange/data/_io.c:4070:24: warning: ‘__pyx_v_value’ may be used uninitialized in this function [-Wmaybe-uninitialized]\n 4070 |           __pyx_t_10 = PyFloat_FromDouble(__pyx_v_value); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 221, __pyx_L5_error)\n      |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nOrange/data/_io.c:480:40: warning: ‘__pyx_v_attr_index’ may be used uninitialized in this function [-Wmaybe-uninitialized]\n  480 |   #define PyInt_FromLong               PyLong_FromLong\n      |                                        ^~~~~~~~~~~~~~~\nOrange/data/_io.c:1301:7: note: ‘__pyx_v_attr_index’ was declared here\n 1301 |   int __pyx_v_attr_index;\n      |       ^~~~~~~~~~~~~~~~~~\nOrange/data/_io.c:2935:25: warning: ‘__pyx_v_atomp’ may be used uninitialized in this function [-Wmaybe-uninitialized]\n 2935 |           __pyx_v_atomp = (__pyx_v_atomp + 1);\n      |           ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~\nIn file included from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1830,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,\n                 from Orange/distance/_distance.c:598:\n/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning \"Using deprecated NumPy API, disable it with \" \"#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION\" [-Wcpp]\n   17 | #warning \"Using deprecated NumPy API, disable it with \" \\\n      |  ^~~~~~~\nIn file included from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1830,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,\n                 from Orange/preprocess/_discretize.c:567:\n/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning \"Using deprecated NumPy API, disable it with \" \"#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION\" [-Wcpp]\n   17 | #warning \"Using deprecated NumPy API, disable it with \" \\\n      |  ^~~~~~~\nIn file included from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1830,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,\n                 from Orange/preprocess/_relieff.cpp:627:\n/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning \"Using deprecated NumPy API, disable it with \" \"#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION\" [-Wcpp]\n   17 | #warning \"Using deprecated NumPy API, disable it with \" \\\n      |  ^~~~~~~\nIn file included from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1830,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,\n                 from Orange/projection/_som.c:598:\n/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning \"Using deprecated NumPy API, disable it with \" \"#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION\" [-Wcpp]\n   17 | #warning \"Using deprecated NumPy API, disable it with \" \\\n      |  ^~~~~~~\nOrange/projection/_som.c: In function ‘__pyx_pw_6Orange_10projection_4_som_5update_hex’:\nOrange/projection/_som.c:3655:7: warning: ‘__pyx_v_win_y’ may be used uninitialized in this function [-Wmaybe-uninitialized]\n 3655 |   int __pyx_v_win_y;\n      |       ^~~~~~~~~~~~~\nOrange/projection/_som.c:3654:7: warning: ‘__pyx_v_win_x’ may be used uninitialized in this function [-Wmaybe-uninitialized]\n 3654 |   int __pyx_v_win_x;\n      |       ^~~~~~~~~~~~~\nOrange/projection/_som.c: In function ‘__pyx_pw_6Orange_10projection_4_som_7get_winners_sparse’:\nOrange/projection/_som.c:4547:223: warning: ‘__pyx_v_win_y’ may be used uninitialized in this function [-Wmaybe-uninitialized]\n 4547 |           *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_winners.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_winners.diminfo[0].strides, __pyx_t_39, __pyx_pybuffernd_winners.diminfo[1].strides) = __pyx_v_win_y;\n      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~\nOrange/projection/_som.c:4114:7: note: ‘__pyx_v_win_y’ was declared here\n 4114 |   int __pyx_v_win_y;\n      |       ^~~~~~~~~~~~~\nOrange/projection/_som.c:4536:223: warning: ‘__pyx_v_win_x’ may be used uninitialized in this function [-Wmaybe-uninitialized]\n 4536 |           *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_winners.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_winners.diminfo[0].strides, __pyx_t_37, __pyx_pybuffernd_winners.diminfo[1].strides) = __pyx_v_win_x;\n      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~\nOrange/projection/_som.c:4113:7: note: ‘__pyx_v_win_x’ was declared here\n 4113 |   int __pyx_v_win_x;\n      |       ^~~~~~~~~~~~~\nOrange/projection/_som.c: In function ‘__pyx_pf_6Orange_10projection_4_som_8update_sparse.constprop’:\nOrange/projection/_som.c:4746:7: warning: ‘__pyx_v_win_y’ may be used uninitialized in this function [-Wmaybe-uninitialized]\n 4746 |   int __pyx_v_win_y;\n      |       ^~~~~~~~~~~~~\nOrange/projection/_som.c:4745:7: warning: ‘__pyx_v_win_x’ may be used uninitialized in this function [-Wmaybe-uninitialized]\n 4745 |   int __pyx_v_win_x;\n      |       ^~~~~~~~~~~~~\nOrange/projection/_som.c: In function ‘__pyx_pw_6Orange_10projection_4_som_3update’:\nOrange/projection/_som.c:3141:7: warning: ‘__pyx_v_win_y’ may be used uninitialized in this function [-Wmaybe-uninitialized]\n 3141 |   int __pyx_v_win_y;\n      |       ^~~~~~~~~~~~~\nOrange/projection/_som.c: In function ‘__pyx_pw_6Orange_10projection_4_som_1get_winners’:\nOrange/projection/_som.c:2964:223: warning: ‘__pyx_v_win_y’ may be used uninitialized in this function [-Wmaybe-uninitialized]\n 2964 |           *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_winners.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_winners.diminfo[0].strides, __pyx_t_28, __pyx_pybuffernd_winners.diminfo[1].strides) = __pyx_v_win_y;\n      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~\nOrange/projection/_som.c:2665:7: note: ‘__pyx_v_win_y’ was declared here\n 2665 |   int __pyx_v_win_y;\n      |       ^~~~~~~~~~~~~\nOrange/projection/_som.c:2953:223: warning: ‘__pyx_v_win_x’ may be used uninitialized in this function [-Wmaybe-uninitialized]\n 2953 |           *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_winners.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_winners.diminfo[0].strides, __pyx_t_26, __pyx_pybuffernd_winners.diminfo[1].strides) = __pyx_v_win_x;\n      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~\nOrange/projection/_som.c:2664:7: note: ‘__pyx_v_win_x’ was declared here\n 2664 |   int __pyx_v_win_x;\n      |       ^~~~~~~~~~~~~\nOrange/projection/_som.c: In function ‘__pyx_pf_6Orange_10projection_4_som_10update_sparse_hex.constprop’:\nOrange/projection/_som.c:5515:7: warning: ‘__pyx_v_win_y’ may be used uninitialized in this function [-Wmaybe-uninitialized]\n 5515 |   int __pyx_v_win_y;\n      |       ^~~~~~~~~~~~~\nOrange/projection/_som.c:5514:7: warning: ‘__pyx_v_win_x’ may be used uninitialized in this function [-Wmaybe-uninitialized]\n 5514 |   int __pyx_v_win_x;\n      |       ^~~~~~~~~~~~~\n/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages/setuptools/command/install.py:37: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.\n  setuptools.SetuptoolsDeprecationWarning,\n/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages/setuptools/command/easy_install.py:159: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.\n  EasyInstallDeprecationWarning,\n/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages/setuptools/command/install.py:37: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.\n  setuptools.SetuptoolsDeprecationWarning,\n/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f/.venv/lib/python3.7/site-packages/setuptools/command/egg_info.py:628: SetuptoolsDeprecationWarning: Custom 'build_py' does not implement 'get_data_files_without_manifest'.\nPlease extend command classes from setuptools instead of distutils.\n  SetuptoolsDeprecationWarning\n",
    "new_commit_res_code": 1,
    "new_commit_res_stdout": "============================= test session starts ==============================\nplatform linux -- Python 3.7.9, pytest-7.4.4, pluggy-1.2.0\nrootdir: /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f\ncollected 14 items\n\nr2e_tests/test_1.py sss.....F.....                                       [100%]\n\n=================================== FAILURES ===================================\n______________________ TestOWDiscretize.test_minimum_size ______________________\n\nself = <r2e_tests.test_1.TestOWDiscretize testMethod=test_minimum_size>\n\n    def test_minimum_size(self):\n        widget = getattr(self, \"widget\", None)\n        if widget is None:\n            self.skipTest(\"minimum size not tested as .widget was not set\")\n>       self.check_minimum_size(widget)\n\n.venv/lib/python3.7/site-packages/orangewidget/tests/base.py:242: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n.venv/lib/python3.7/site-packages/orangewidget/tests/base.py:615: in check_minimum_size\n    self.assertLess(min_size.width(), 800)\nE   AssertionError: 1028 not less than 800\n==================================== PASSES ====================================\n=========================== short test summary info ============================\nPASSED r2e_tests/test_1.py::TestOWDiscretize::test_empty_data\nPASSED r2e_tests/test_1.py::TestOWDiscretize::test_image_export\nPASSED r2e_tests/test_1.py::TestOWDiscretize::test_manual_cuts_copy\nPASSED r2e_tests/test_1.py::TestOWDiscretize::test_manual_cuts_edit\nPASSED r2e_tests/test_1.py::TestOWDiscretize::test_migration\nPASSED r2e_tests/test_1.py::TestOWDiscretize::test_msg_base_class\nPASSED r2e_tests/test_1.py::TestOWDiscretize::test_select_method\nPASSED r2e_tests/test_1.py::TestOWDiscretize::test_summary\nPASSED r2e_tests/test_1.py::TestValidator::test_fixup\nPASSED r2e_tests/test_1.py::TestValidator::test_validate\nSKIPPED [1] .venv/lib/python3.7/site-packages/orangewidget/tests/base.py:244: image exporting not tested as .widget was not set\nSKIPPED [1] .venv/lib/python3.7/site-packages/orangewidget/tests/base.py:238: minimum size not tested as .widget was not set\nSKIPPED [1] .venv/lib/python3.7/site-packages/orangewidget/tests/base.py:250: msg base class not tested as .widget was not set\nFAILED r2e_tests/test_1.py::TestOWDiscretize::test_minimum_size - AssertionEr...\n=================== 1 failed, 10 passed, 3 skipped in 5.24s ====================\nWidgets left: 0    Max widgets: 890 \n\n",
    "new_commit_res_stderr": "",
    "old_commit_res_code": 1,
    "old_commit_res_stdout": "============================= test session starts ==============================\nplatform linux -- Python 3.7.9, pytest-7.4.4, pluggy-1.2.0\nrootdir: /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_964b6197e76ac970065bbc40485e28dbd963d62f\ncollected 14 items\n\nr2e_tests/test_1.py sss.....F....F                                       [100%]\n\n=================================== FAILURES ===================================\n______________________ TestOWDiscretize.test_minimum_size ______________________\n\nself = <r2e_tests.test_1.TestOWDiscretize testMethod=test_minimum_size>\n\n    def test_minimum_size(self):\n        widget = getattr(self, \"widget\", None)\n        if widget is None:\n            self.skipTest(\"minimum size not tested as .widget was not set\")\n>       self.check_minimum_size(widget)\n\n.venv/lib/python3.7/site-packages/orangewidget/tests/base.py:242: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n.venv/lib/python3.7/site-packages/orangewidget/tests/base.py:615: in check_minimum_size\n    self.assertLess(min_size.width(), 800)\nE   AssertionError: 1028 not less than 800\n_________________________ TestValidator.test_validate __________________________\n\nself = <r2e_tests.test_1.TestValidator testMethod=test_validate>\n\n    def test_validate(self):\n        v = IncreasingNumbersListValidator()\n        self.assertEqual(v.validate(\"\", 0), (v.Acceptable, '', 0))\n        self.assertEqual(v.validate(\"1\", 1), (v.Acceptable, '1', 1))\n>       self.assertEqual(v.validate(\",\", 0), (v.Acceptable, ',', 0))\nE       AssertionError: Tuples differ: (1, ',', 0) != (2, ',', 0)\nE       \nE       First differing element 0:\nE       1\nE       2\nE       \nE       - (1, ',', 0)\nE       ?  ^\nE       \nE       + (2, ',', 0)\nE       ?  ^\n\nr2e_tests/test_1.py:143: AssertionError\n==================================== PASSES ====================================\n=========================== short test summary info ============================\nPASSED r2e_tests/test_1.py::TestOWDiscretize::test_empty_data\nPASSED r2e_tests/test_1.py::TestOWDiscretize::test_image_export\nPASSED r2e_tests/test_1.py::TestOWDiscretize::test_manual_cuts_copy\nPASSED r2e_tests/test_1.py::TestOWDiscretize::test_manual_cuts_edit\nPASSED r2e_tests/test_1.py::TestOWDiscretize::test_migration\nPASSED r2e_tests/test_1.py::TestOWDiscretize::test_msg_base_class\nPASSED r2e_tests/test_1.py::TestOWDiscretize::test_select_method\nPASSED r2e_tests/test_1.py::TestOWDiscretize::test_summary\nPASSED r2e_tests/test_1.py::TestValidator::test_fixup\nSKIPPED [1] .venv/lib/python3.7/site-packages/orangewidget/tests/base.py:244: image exporting not tested as .widget was not set\nSKIPPED [1] .venv/lib/python3.7/site-packages/orangewidget/tests/base.py:238: minimum size not tested as .widget was not set\nSKIPPED [1] .venv/lib/python3.7/site-packages/orangewidget/tests/base.py:250: msg base class not tested as .widget was not set\nFAILED r2e_tests/test_1.py::TestOWDiscretize::test_minimum_size - AssertionEr...\nFAILED r2e_tests/test_1.py::TestValidator::test_validate - AssertionError: Tu...\n==================== 2 failed, 9 passed, 3 skipped in 3.08s ====================\nWidgets left: 0    Max widgets: 890 \n\n",
    "old_commit_res_stderr": ""
}
Orange/widgets/data/owdiscretize.py Orange/widgets/data/tests/test_owdiscretize.py
We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[ISSUE]
**Title:** Validator incorrectly marks empty parts as Intermediate instead of Acceptable

**Description:**
When validating input strings that contain empty parts, the `IncreasingNumbersListValidator` incorrectly assigns an `Intermediate` state, causing related validations to fail.

**Example Buggy Code:**
```python
v = IncreasingNumbersListValidator()
result = v.validate(",", 0)
print(result)  # Expected: (v.Acceptable, ',', 0)
              # Actual: (v.Intermediate, ',', 0)
```

**Expected Behavior:**
The validator should recognize empty parts in the input string as acceptable, returning an `Acceptable` state.

**Actual Behavior:**
Empty parts are incorrectly marked as `Intermediate`, leading to unexpected validation failures.
[/ISSUE]
--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.

--- BEGIN FILE ---
```
### Orange/widgets/data/owdiscretize.py
import re
from enum import IntEnum
from collections import namedtuple
from typing import Optional, Tuple, Iterable

from AnyQt.QtWidgets import (
    QListView, QHBoxLayout, QStyledItemDelegate, QButtonGroup, QWidget,
    QLineEdit, QToolTip, QLabel, QApplication
)
from AnyQt.QtGui import QValidator, QPalette
from AnyQt.QtCore import Qt, QTimer, QPoint

import Orange.data
import Orange.preprocess.discretize as disc

from Orange.widgets import widget, gui, settings
from Orange.widgets.utils import itemmodels, vartype, unique_everseen
from Orange.widgets.utils.widgetpreview import WidgetPreview
from Orange.widgets.utils.state_summary import format_summary_details
from Orange.widgets.widget import Input, Output
from Orange.widgets.data.oweditdomain import FixedSizeButton

__all__ = ["OWDiscretize"]

# 'Default' method delegates to 'method'
Default = namedtuple("Default", ["method"])
Leave = namedtuple("Leave", [])
MDL = namedtuple("MDL", [])
EqualFreq = namedtuple("EqualFreq", ["k"])
EqualWidth = namedtuple("EqualWidth", ["k"])
Remove = namedtuple("Remove", [])
Custom = namedtuple("Custom", ["points"])

METHODS = [
    (Default, ),
    (Leave, ),
    (MDL, ),
    (EqualFreq, ),
    (EqualWidth, ),
    (Remove, ),
    (Custom, )
]

_dispatch = {
    Default:
        lambda m, data, var: _dispatch[type(m.method)](m.method, data, var),
    Leave: lambda m, data, var: var,
    MDL: lambda m, data, var: disc.EntropyMDL()(data, var),
    EqualFreq: lambda m, data, var: disc.EqualFreq(m.k)(data, var),
    EqualWidth: lambda m, data, var: disc.EqualWidth(m.k)(data, var),
    Remove: lambda m, data, var: None,
    Custom:
        lambda m, data, var:
        disc.Discretizer.create_discretized_var(var, m.points)
}


# Variable discretization state
DState = namedtuple(
    "DState",
    ["method",    # discretization method
     "points",    # induced cut points
     "disc_var"]  # induced discretized variable
)


def is_derived(var):
    return var.compute_value is not None


def is_discretized(var):
    return isinstance(var.compute_value, disc.Discretizer)


def variable_key(var):
    return vartype(var), var.name


def button_group_reset(group):
    button = group.checkedButton()
    if button is not None:
        group.setExclusive(False)
        button.setChecked(False)
        group.setExclusive(True)


class DiscDelegate(QStyledItemDelegate):
    def initStyleOption(self, option, index):
        super().initStyleOption(option, index)
        state = index.data(Qt.UserRole)

        if state is not None:
            extra = self.cutsText(state)
            option.text = option.text + ": " + extra

    @staticmethod
    def cutsText(state):
        # This function has many branches, but they don't hurt readabability
        # pylint: disable=too-many-branches
        method = state.method
        name = None
        # Need a better way to distinguish discretization states
        # i.e. between 'induced no points v.s. 'removed by choice'
        if state.points is None and state.disc_var is not None:
            points = ""
        elif state.points is None:
            points = "..."
        elif state.points == []:
            points = "<removed>"
        else:
            points = ", ".join(map("{:.2f}".format, state.points))

        if isinstance(method, Default):
            name = None
        elif isinstance(method, Leave):
            name = "(leave)"
        elif isinstance(method, MDL):
            name = "(entropy)"
        elif isinstance(method, EqualFreq):
            name = "(equal frequency k={})".format(method.k)
        elif isinstance(method, EqualWidth):
            name = "(equal width k={})".format(method.k)
        elif isinstance(method, Remove):
            name = "(removed)"
        elif isinstance(method, Custom):
            name = "(custom)"
        else:
            assert False

        if name is not None:
            return points + " " + name
        else:
            return points


#: Discretization methods
class Methods(IntEnum):
    Default, Leave, MDL, EqualFreq, EqualWidth, Remove, Custom = range(7)

    @staticmethod
    def from_method(method):
        return Methods[type(method).__name__]


def parse_float(string: str) -> Optional[float]:
    try:
        return float(string)
    except ValueError:
        return None


class IncreasingNumbersListValidator(QValidator):
    """
    Match a comma separated list of non-empty and increasing number strings.

    Example
    -------
    >>> v = IncreasingNumbersListValidator()
    >>> v.validate("", 0)   # Acceptable
    (2, '', 0)
    >>> v.validate("1", 1)  # Acceptable
    (2, '1', 1)
    >>> v.validate("1,,", 1)  # Intermediate
    (1, '1,,', 1)
    """
    @staticmethod
    def itersplit(string: str) -> Iterable[Tuple[int, int]]:
        sepiter = re.finditer(r"(?<!\\),", string)
        start = 0
        for match in sepiter:
            yield start, match.start()
            start = match.end()
        # yield the rest if any
        if start < len(string):
            yield start, len(string)

    def validate(self, string: str, pos: int) -> Tuple[QValidator.State, str, int]:
        state = QValidator.Acceptable
        # Matches non-complete intermediate numbers (while editing)
        intermediate = re.compile(r"([+-]?\s?\d*\s?\d*\.?\d*\s?\d*)")
        values = []
        for start, end in self.itersplit(string):
            valuestr = string[start:end].strip()
            if not valuestr:
                state = min(state, QValidator.Intermediate)
                # Middle element is empty
                continue
            value = parse_float(valuestr)
            if value is None:
                if intermediate.fullmatch(valuestr):
                    state = min(state, QValidator.Intermediate)
                    continue
                return QValidator.Invalid, string, pos
            if values and value <= values[-1]:
                state = min(state, QValidator.Intermediate)
            else:
                values.append(value)
        return state, string, pos

    def fixup(self, string):
        # type: (str) -> str
        """
        Fixup the input. Remove empty parts from the string.
        """
        parts = [string[start: end] for start, end in self.itersplit(string)]
        parts = [part for part in parts if part.strip()]
        return ", ".join(parts)


def show_tip(
        widget: QWidget, pos: QPoint, text: str, timeout=-1,
        textFormat=Qt.AutoText, wordWrap=None
):
    propname = __name__ + "::show_tip_qlabel"
    if timeout < 0:
        timeout = widget.toolTipDuration()
    if timeout < 0:
        timeout = 5000 + 40 * max(0, len(text) - 100)
    tip = widget.property(propname)
    if not text and tip is None:
        return

    def hide():
        w = tip.parent()
        w.setProperty(propname, None)
        tip.timer.stop()
        tip.close()
        tip.deleteLater()

    if not isinstance(tip, QLabel):
        tip = QLabel(objectName="tip-label", focusPolicy=Qt.NoFocus)
        tip.setBackgroundRole(QPalette.ToolTipBase)
        tip.setForegroundRole(QPalette.ToolTipText)
        tip.setPalette(QToolTip.palette())
        tip.setFont(QApplication.font("QTipLabel"))
        tip.timer = QTimer(tip, singleShot=True, objectName="hide-timer")
        tip.timer.timeout.connect(hide)
        widget.setProperty(propname, tip)
        tip.setParent(widget, Qt.ToolTip)

    tip.setText(text)
    tip.setTextFormat(textFormat)
    if wordWrap is None:
        wordWrap = textFormat != Qt.PlainText
    tip.setWordWrap(wordWrap)

    if not text:
        hide()
    else:
        tip.timer.start(timeout)
        tip.show()
        tip.move(pos)


class OWDiscretize(widget.OWWidget):
    # pylint: disable=too-many-instance-attributes
    name = "Discretize"
    description = "Discretize the numeric data features."
    icon = "icons/Discretize.svg"
    keywords = []

    class Inputs:
        data = Input("Data", Orange.data.Table, doc="Input data table")

    class Outputs:
        data = Output("Data", Orange.data.Table, doc="Table with discretized features")

    settingsHandler = settings.DomainContextHandler()
    settings_version = 2
    saved_var_states = settings.ContextSetting({})

    #: The default method name
    default_method_name = settings.Setting(Methods.EqualFreq.name)
    #: The k for Equal{Freq,Width}
    default_k = settings.Setting(3)
    #: The default cut points for custom entry
    default_cutpoints: Tuple[float, ...] = settings.Setting(())
    autosend = settings.Setting(True)

    #: Discretization methods
    Default, Leave, MDL, EqualFreq, EqualWidth, Remove, Custom = list(Methods)

    want_main_area = False
    resizing_enabled = False

    def __init__(self):
        super().__init__()

        #: input data
        self.data = None
        self.class_var = None
        #: Current variable discretization state
        self.var_state = {}
        #: Saved variable discretization settings (context setting)
        self.saved_var_states = {}

        self.method = Methods.Default
        self.k = 5
        self.cutpoints = ()
        self.default_cutpoints = ()

        box = gui.vBox(self.controlArea, self.tr("Default Discretization"))
        self._default_method_ = 0
        self.default_bbox = rbox = gui.radioButtons(
            box, self, "_default_method_", callback=self._default_disc_changed)
        self.default_button_group = bg = rbox.findChild(QButtonGroup)
        bg.buttonClicked[int].connect(self.set_default_method)

        rb = gui.hBox(rbox)
        self.left = gui.vBox(rb)
        right = gui.vBox(rb)
        rb.layout().setStretch(0, 1)
        rb.layout().setStretch(1, 1)
        self.options = [
            (Methods.Default, self.tr("Default")),
            (Methods.Leave, self.tr("Leave numeric")),
            (Methods.MDL, self.tr("Entropy-MDL discretization")),
            (Methods.EqualFreq, self.tr("Equal-frequency discretization")),
            (Methods.EqualWidth, self.tr("Equal-width discretization")),
            (Methods.Remove, self.tr("Remove numeric variables")),
            (Methods.Custom, self.tr("Manual")),
        ]

        for id_, opt in self.options[1:]:
            t = gui.appendRadioButton(rbox, opt)
            bg.setId(t, id_)
            t.setChecked(id_ == self.default_method)
            [right, self.left][opt.startswith("Equal")].layout().addWidget(t)

        def _intbox(parent, attr, callback):
            box = gui.indentedBox(parent)
            s = gui.spin(
                box, self, attr, minv=2, maxv=10, label="Num. of intervals:",
                callback=callback)
            s.setMaximumWidth(60)
            s.setAlignment(Qt.AlignRight)
            gui.rubber(s.box)
            sp = box.sizePolicy()
            sp.setControlType(sp.SpinBox)
            return box.box

        self.k_general = _intbox(self.left, "default_k",
                                 self._default_disc_changed)
        self.k_general.layout().setContentsMargins(0, 0, 0, 0)

        def manual_cut_editline(text="") -> QLineEdit:
            edit = QLineEdit(
                text=text,
                placeholderText="e.g. 0.0, 0.5, 1.0",
                toolTip="Enter fixed discretization cut points (a comma "
                        "separated list of strictly increasing numbers e.g. "
                        "0.0, 0.5, 1.0).",
            )
            @edit.textChanged.connect
            def update():
                validator = edit.validator()
                if validator is not None:
                    state, _, _ = validator.validate(edit.text(), 0)
                else:
                    state = QValidator.Acceptable
                palette = edit.palette()
                colors = {
                    QValidator.Intermediate: (Qt.yellow, Qt.black),
                    QValidator.Invalid: (Qt.red, Qt.black),
                }.get(state, None)
                if colors is None:
                    palette = QPalette()
                else:
                    palette.setColor(QPalette.Base, colors[0])
                    palette.setColor(QPalette.Text, colors[1])

                cr = edit.cursorRect()
                p = edit.mapToGlobal(cr.bottomRight())
                edit.setPalette(palette)
                if state != QValidator.Acceptable and edit.isVisible():
                    show_tip(edit, p, edit.toolTip(), textFormat=Qt.RichText)
                else:
                    show_tip(edit, p, "")
            return edit

        self.manual_cuts_edit = manual_cut_editline(
            text=", ".join(map(str, self.default_cutpoints))
        )

        def set_manual_default_cuts():
            text = self.manual_cuts_edit.text()
            self.default_cutpoints = tuple(
                float(s.strip()) for s in text.split(",") if s.strip())
            self._default_disc_changed()
        self.manual_cuts_edit.editingFinished.connect(set_manual_default_cuts)

        validator = IncreasingNumbersListValidator()
        self.manual_cuts_edit.setValidator(validator)
        ibox = gui.indentedBox(right, orientation=Qt.Horizontal)
        ibox.layout().addWidget(self.manual_cuts_edit)

        right.layout().addStretch(10)
        self.left.layout().addStretch(10)

        self.connect_control(
            "default_cutpoints",
            lambda values: self.manual_cuts_edit.setText(", ".join(map(str, values)))
        )
        vlayout = QHBoxLayout()
        box = gui.widgetBox(
            self.controlArea, "Individual Attribute Settings",
            orientation=vlayout, spacing=8
        )

        # List view with all attributes
        self.varview = QListView(
            selectionMode=QListView.ExtendedSelection,
            uniformItemSizes=True,
        )
        self.varview.setItemDelegate(DiscDelegate())
        self.varmodel = itemmodels.VariableListModel()
        self.varview.setModel(self.varmodel)
        self.varview.selectionModel().selectionChanged.connect(
            self._var_selection_changed
        )

        vlayout.addWidget(self.varview)
        # Controls for individual attr settings
        self.bbox = controlbox = gui.radioButtons(
            box, self, "method", callback=self._disc_method_changed
        )
        vlayout.addWidget(controlbox)
        self.variable_button_group = bg = controlbox.findChild(QButtonGroup)
        for id_, opt in self.options[:5]:
            b = gui.appendRadioButton(controlbox, opt)
            bg.setId(b, id_)

        self.k_specific = _intbox(controlbox, "k", self._disc_method_changed)

        gui.appendRadioButton(controlbox, "Remove attribute", id=Methods.Remove)
        b = gui.appendRadioButton(controlbox, "Manual", id=Methods.Custom)

        self.manual_cuts_specific = manual_cut_editline()
        self.manual_cuts_specific.setValidator(validator)
        b.toggled[bool].connect(self.manual_cuts_specific.setEnabled)

        def set_manual_cuts():
            text = self.manual_cuts_specific.text()
            points = [t for t in text.split(",") if t.split()]
            self.cutpoints = tuple(float(t) for t in points)
            self._disc_method_changed()
        self.manual_cuts_specific.editingFinished.connect(set_manual_cuts)

        self.connect_control(
            "cutpoints",
            lambda values: self.manual_cuts_specific.setText(", ".join(map(str, values)))
        )
        ibox = gui.indentedBox(controlbox, orientation=Qt.Horizontal)
        self.copy_current_to_manual_button = b = FixedSizeButton(
            text="CC", toolTip="Copy the current cut points to manual mode",
            enabled=False
        )
        b.clicked.connect(self._copy_to_manual)
        ibox.layout().addWidget(self.manual_cuts_specific)
        ibox.layout().addWidget(b)

        gui.rubber(controlbox)
        controlbox.setEnabled(False)
        bg.button(self.method)
        self.controlbox = controlbox

        box = gui.auto_apply(self.controlArea, self, "autosend")
        box.button.setFixedWidth(180)
        box.layout().insertStretch(0)

        self._update_spin_positions()

        self.info.set_input_summary(self.info.NoInput)
        self.info.set_output_summary(self.info.NoOutput)

    @property
    def default_method(self) -> Methods:
        return Methods[self.default_method_name]

    @default_method.setter
    def default_method(self, method):
        self.set_default_method(method)

    def set_default_method(self, method: Methods):
        if isinstance(method, int):
            method = Methods(method)
        else:
            method = Methods.from_method(method)

        if method != self.default_method:
            self.default_method_name = method.name
            self.default_button_group.button(method).setChecked(True)
            self._default_disc_changed()

    @Inputs.data
    def set_data(self, data):
        self.closeContext()
        self.data = data
        if self.data is not None:
            self._initialize(data)
            self.openContext(data)
            # Restore the per variable discretization settings
            self._restore(self.saved_var_states)
            # Complete the induction of cut points
            self._update_points()
            self.info.set_input_summary(len(data),
                                        format_summary_details(data))
        else:
            self.info.set_input_summary(self.info.NoInput)
            self._clear()
        self.unconditional_commit()

    def _initialize(self, data):
        # Initialize the default variable states for new data.
        self.class_var = data.domain.class_var
        cvars = [var for var in data.domain.variables
                 if var.is_continuous]
        self.varmodel[:] = cvars

        has_disc_class = data.domain.has_discrete_class

        def set_enabled(box: QWidget, id_: Methods, state: bool):
            bg = box.findChild(QButtonGroup)
            b = bg.button(id_)
            b.setEnabled(state)

        set_enabled(self.default_bbox, self.MDL, has_disc_class)
        bg = self.bbox.findChild(QButtonGroup)
        b = bg.button(Methods.MDL)
        b.setEnabled(has_disc_class)
        set_enabled(self.bbox, self.MDL, has_disc_class)

        # If the newly disabled MDL button is checked then change it
        if not has_disc_class and self.default_method == self.MDL:
            self.default_method = Methods.Leave
        if not has_disc_class and self.method == self.MDL:
            self.method = Methods.Default

        # Reset (initialize) the variable discretization states.
        self._reset()

    def _restore(self, saved_state):
        # Restore variable states from a saved_state dictionary.
        def_method = self._current_default_method()
        for i, var in enumerate(self.varmodel):
            key = variable_key(var)
            if key in saved_state:
                state = saved_state[key]
                if isinstance(state.method, Default):
                    state = DState(Default(def_method), None, None)
                self._set_var_state(i, state)

    def _reset(self):
        # restore the individual variable settings back to defaults.
        def_method = self._current_default_method()
        self.var_state = {}
        for i in range(len(self.varmodel)):
            state = DState(Default(def_method), None, None)
            self._set_var_state(i, state)

    def _set_var_state(self, index, state):
        # set the state of variable at `index` to `state`.
        self.var_state[index] = state
        self.varmodel.setData(self.varmodel.index(index), state, Qt.UserRole)

    def _clear(self):
        self.data = None
        self.varmodel[:] = []
        self.var_state = {}
        self.saved_var_states = {}
        self.default_button_group.button(self.MDL).setEnabled(True)
        self.variable_button_group.button(self.MDL).setEnabled(True)

    def _update_points(self):
        """
        Update the induced cut points.
        """
        if self.data is None:
            return

        def induce_cuts(method, data, var):
            dvar = _dispatch[type(method)](method, data, var)
            if dvar is None:
                # removed
                return [], None
            elif dvar is var:
                # no transformation took place
                return None, var
            elif is_discretized(dvar):
                return dvar.compute_value.points, dvar
            raise ValueError

        for i, var in enumerate(self.varmodel):
            state = self.var_state[i]
            if state.points is None and state.disc_var is None:
                points, dvar = induce_cuts(state.method, self.data, var)
                new_state = state._replace(points=points, disc_var=dvar)
                self._set_var_state(i, new_state)

    def _current_default_method(self):
        method = self.default_method
        k = self.default_k
        if method == Methods.Leave:
            def_method = Leave()
        elif method == Methods.MDL:
            def_method = MDL()
        elif method == Methods.EqualFreq:
            def_method = EqualFreq(k)
        elif method == Methods.EqualWidth:
            def_method = EqualWidth(k)
        elif method == Methods.Remove:
            def_method = Remove()
        elif method == Methods.Custom:
            def_method = Custom(self.default_cutpoints)
        else:
            assert False
        return def_method

    def _current_method(self):
        if self.method == Methods.Default:
            method = Default(self._current_default_method())
        elif self.method == Methods.Leave:
            method = Leave()
        elif self.method == Methods.MDL:
            method = MDL()
        elif self.method == Methods.EqualFreq:
            method = EqualFreq(self.k)
        elif self.method == Methods.EqualWidth:
            method = EqualWidth(self.k)
        elif self.method == Methods.Remove:
            method = Remove()
        elif self.method == Methods.Custom:
            method = Custom(self.cutpoints)
        else:
            assert False
        return method

    def _update_spin_positions(self):
        kmethods = [Methods.EqualFreq, Methods.EqualWidth]
        self.k_general.setDisabled(self.default_method not in kmethods)
        if self.default_method == Methods.EqualFreq:
            self.left.layout().insertWidget(1, self.k_general)
        elif self.default_method == Methods.EqualWidth:
            self.left.layout().insertWidget(2, self.k_general)

        self.k_specific.setDisabled(self.method not in kmethods)
        if self.method == Methods.EqualFreq:
            self.bbox.layout().insertWidget(4, self.k_specific)
        elif self.method == Methods.EqualWidth:
            self.bbox.layout().insertWidget(5, self.k_specific)

    def _default_disc_changed(self):
        self._update_spin_positions()
        method = self._current_default_method()
        state = DState(Default(method), None, None)
        for i, _ in enumerate(self.varmodel):
            if isinstance(self.var_state[i].method, Default):
                self._set_var_state(i, state)
        self._update_points()
        self.commit()

    def _disc_method_changed(self):
        self._update_spin_positions()
        indices = self.selected_indices()
        method = self._current_method()
        state = DState(method, None, None)
        for idx in indices:
            self._set_var_state(idx, state)
        self._update_points()
        self._copy_to_manual_update_enabled()
        self.commit()

    def _copy_to_manual(self):
        indices = self.selected_indices()
        # set of all methods for the current selection
        if len(indices) != 1:
            return
        index = indices[0]
        state = self.var_state[index]
        points = state.points
        if points is None:
            points = ()
        else:
            points = tuple(state.points)
        state = state._replace(method=Custom(points), points=None, disc_var=None)
        self._set_var_state(index, state)
        self.method = Methods.Custom
        self.cutpoints = points
        self._update_points()
        self.commit()

    def _copy_to_manual_update_enabled(self):
        indices = self.selected_indices()
        methods = [self.var_state[i].method for i in indices]
        self.copy_current_to_manual_button.setEnabled(
            len(indices) == 1 and not isinstance(methods[0], Custom))

    def _var_selection_changed(self, *_):
        self._copy_to_manual_update_enabled()
        indices = self.selected_indices()
        # set of all methods for the current selection
        methods = [self.var_state[i].method for i in indices]

        def key(method):
            if isinstance(method, Default):
                return Default, (None, )
            return type(method), tuple(method)

        mset = list(unique_everseen(methods, key=key))

        self.controlbox.setEnabled(len(mset) > 0)
        if len(mset) == 1:
            method = mset.pop()
            self.method = Methods.from_method(method)
            if isinstance(method, (EqualFreq, EqualWidth)):
                self.k = method.k
            elif isinstance(method, Custom):
                self.cutpoints = method.points
        else:
            # deselect the current button
            self.method = -1
            bg = self.controlbox.group
            button_group_reset(bg)
        self._update_spin_positions()

    def selected_indices(self):
        rows = self.varview.selectionModel().selectedRows()
        return [index.row() for index in rows]

    def method_for_index(self, index):
        state = self.var_state[index]
        return state.method

    def discretized_var(self, index):
        # type: (int) -> Optional[Orange.data.DiscreteVariable]
        state = self.var_state[index]
        if state.disc_var is not None and state.points == []:
            # Removed by MDL Entropy
            return None
        else:
            return state.disc_var

    def discretized_domain(self):
        """
        Return the current effective discretized domain.
        """
        if self.data is None:
            return None

        # a mapping of all applied changes for variables in `varmodel`
        mapping = {var: self.discretized_var(i)
                   for i, var in enumerate(self.varmodel)}

        def disc_var(source):
            return mapping.get(source, source)

        # map the full input domain to the new variables (where applicable)
        attributes = [disc_var(v) for v in self.data.domain.attributes]
        attributes = [v for v in attributes if v is not None]

        class_vars = [disc_var(v) for v in self.data.domain.class_vars]
        class_vars = [v for v in class_vars if v is not None]

        domain = Orange.data.Domain(
            attributes, class_vars, metas=self.data.domain.metas
        )
        return domain

    def commit(self):
        output = None
        if self.data is not None:
            domain = self.discretized_domain()
            output = self.data.transform(domain)

        summary = len(output) if output else self.info.NoOutput
        details = format_summary_details(output) if output else ""
        self.info.set_output_summary(summary, details)
        self.Outputs.data.send(output)

    def storeSpecificSettings(self):
        super().storeSpecificSettings()
        self.saved_var_states = {
            variable_key(var):
                self.var_state[i]._replace(points=None, disc_var=None)
            for i, var in enumerate(self.varmodel)
        }

    def send_report(self):
        self.report_items((
            ("Default method", self.options[self.default_method][1]),))
        if self.varmodel:
            self.report_items("Thresholds", [
                (var.name,
                 DiscDelegate.cutsText(self.var_state[i]) or "leave numeric")
                for i, var in enumerate(self.varmodel)])

    @classmethod
    def migrate_settings(cls, settings, version):  # pylint: disable=redefined-outer-name
        if version is None or version < 2:
            # was stored as int indexing Methods (but offset by 1)
            default = settings.pop("default_method", 0)
            default = Methods(default + 1)
            settings["default_method_name"] = default.name


if __name__ == "__main__":  # pragma: no cover
    WidgetPreview(OWDiscretize).run(Orange.data.Table("brown-selected"))

```
--- END FILE ---

Please first localize the bug based on the issue statement, and then generate *SEARCH/REPLACE* edits to fix the issue.

Every *SEARCH/REPLACE* edit must use this format:
1. The file path
2. The start of search block: <<<<<<< SEARCH
3. A contiguous chunk of lines to search for in the existing source code
4. The dividing line: =======
5. The lines to replace into the source code
6. The end of the replace block: >>>>>>> REPLACE

Here is an example:

```python
### mathweb/flask/app.py
<<<<<<< SEARCH
from flask import Flask
=======
import math
from flask import Flask
>>>>>>> REPLACE
```
</solution>

Please note that the *SEARCH/REPLACE* edit REQUIRES PROPER INDENTATION. If you would like to add the line '        print(x)', you must fully write that out, with all those spaces before the code!
Wrap each *SEARCH/REPLACE* edit in a code block as shown in the example above. If you have multiple *SEARCH/REPLACE* edits, use a separate code block for each one.
[ISSUE]
**Title:** Validator incorrectly marks empty parts as Intermediate instead of Acceptable

**Description:**
When validating input strings that contain empty parts, the `IncreasingNumbersListValidator` incorrectly assigns an `Intermediate` state, causing related validations to fail.

**Example Buggy Code:**
```python
v = IncreasingNumbersListValidator()
result = v.validate(",", 0)
print(result)  # Expected: (v.Acceptable, ',', 0)
              # Actual: (v.Intermediate, ',', 0)
```

**Expected Behavior:**
The validator should recognize empty parts in the input string as acceptable, returning an `Acceptable` state.

**Actual Behavior:**
Empty parts are incorrectly marked as `Intermediate`, leading to unexpected validation failures.
[/ISSUE]
{
    "TestOWDiscretize.test_empty_data": "PASSED",
    "TestOWDiscretize.test_image_export": "PASSED",
    "TestOWDiscretize.test_manual_cuts_copy": "PASSED",
    "TestOWDiscretize.test_manual_cuts_edit": "PASSED",
    "TestOWDiscretize.test_migration": "PASSED",
    "TestOWDiscretize.test_msg_base_class": "PASSED",
    "TestOWDiscretize.test_select_method": "PASSED",
    "TestOWDiscretize.test_summary": "PASSED",
    "TestValidator.test_fixup": "PASSED",
    "TestValidator.test_validate": "PASSED",
    "TestOWDiscretize.test_minimum_size": "FAILED"
}
diff --git a/Orange/widgets/data/owdiscretize.py b/Orange/widgets/data/owdiscretize.py
index 8c3c33e02..159dd6888 100644
--- a/Orange/widgets/data/owdiscretize.py
+++ b/Orange/widgets/data/owdiscretize.py
@@ -182,8 +182,7 @@ class IncreasingNumbersListValidator(QValidator):
         for start, end in self.itersplit(string):
             valuestr = string[start:end].strip()
             if not valuestr:
-                state = min(state, QValidator.Intermediate)
-                # Middle element is empty
+                # Middle element is empty (will be fixed by fixup)
                 continue
             value = parse_float(valuestr)
             if value is None:

{"Orange/widgets/data/owdiscretize.py": "import re\nfrom enum import IntEnum\nfrom collections import namedtuple\nfrom typing import Optional, Tuple, Iterable\n\nfrom AnyQt.QtWidgets import (\n    QListView, QHBoxLayout, QStyledItemDelegate, QButtonGroup, QWidget,\n    QLineEdit, QToolTip, QLabel, QApplication\n)\nfrom AnyQt.QtGui import QValidator, QPalette\nfrom AnyQt.QtCore import Qt, QTimer, QPoint\n\nimport Orange.data\nimport Orange.preprocess.discretize as disc\n\nfrom Orange.widgets import widget, gui, settings\nfrom Orange.widgets.utils import itemmodels, vartype, unique_everseen\nfrom Orange.widgets.utils.widgetpreview import WidgetPreview\nfrom Orange.widgets.utils.state_summary import format_summary_details\nfrom Orange.widgets.widget import Input, Output\nfrom Orange.widgets.data.oweditdomain import FixedSizeButton\n\n__all__ = [\"OWDiscretize\"]\n\n# 'Default' method delegates to 'method'\nDefault = namedtuple(\"Default\", [\"method\"])\nLeave = namedtuple(\"Leave\", [])\nMDL = namedtuple(\"MDL\", [])\nEqualFreq = namedtuple(\"EqualFreq\", [\"k\"])\nEqualWidth = namedtuple(\"EqualWidth\", [\"k\"])\nRemove = namedtuple(\"Remove\", [])\nCustom = namedtuple(\"Custom\", [\"points\"])\n\nMETHODS = [\n    (Default, ),\n    (Leave, ),\n    (MDL, ),\n    (EqualFreq, ),\n    (EqualWidth, ),\n    (Remove, ),\n    (Custom, )\n]\n\n_dispatch = {\n    Default:\n        lambda m, data, var: _dispatch[type(m.method)](m.method, data, var),\n    Leave: lambda m, data, var: var,\n    MDL: lambda m, data, var: disc.EntropyMDL()(data, var),\n    EqualFreq: lambda m, data, var: disc.EqualFreq(m.k)(data, var),\n    EqualWidth: lambda m, data, var: disc.EqualWidth(m.k)(data, var),\n    Remove: lambda m, data, var: None,\n    Custom:\n        lambda m, data, var:\n        disc.Discretizer.create_discretized_var(var, m.points)\n}\n\n\n# Variable discretization state\nDState = namedtuple(\n    \"DState\",\n    [\"method\",    # discretization method\n     \"points\",    # induced cut points\n     \"disc_var\"]  # induced discretized variable\n)\n\n\ndef is_derived(var):\n    return var.compute_value is not None\n\n\ndef is_discretized(var):\n    return isinstance(var.compute_value, disc.Discretizer)\n\n\ndef variable_key(var):\n    return vartype(var), var.name\n\n\ndef button_group_reset(group):\n    button = group.checkedButton()\n    if button is not None:\n        group.setExclusive(False)\n        button.setChecked(False)\n        group.setExclusive(True)\n\n\nclass DiscDelegate(QStyledItemDelegate):\n    def initStyleOption(self, option, index):\n        super().initStyleOption(option, index)\n        state = index.data(Qt.UserRole)\n\n        if state is not None:\n            extra = self.cutsText(state)\n            option.text = option.text + \": \" + extra\n\n    @staticmethod\n    def cutsText(state):\n        # This function has many branches, but they don't hurt readabability\n        # pylint: disable=too-many-branches\n        method = state.method\n        name = None\n        # Need a better way to distinguish discretization states\n        # i.e. between 'induced no points v.s. 'removed by choice'\n        if state.points is None and state.disc_var is not None:\n            points = \"\"\n        elif state.points is None:\n            points = \"...\"\n        elif state.points == []:\n            points = \"<removed>\"\n        else:\n            points = \", \".join(map(\"{:.2f}\".format, state.points))\n\n        if isinstance(method, Default):\n            name = None\n        elif isinstance(method, Leave):\n            name = \"(leave)\"\n        elif isinstance(method, MDL):\n            name = \"(entropy)\"\n        elif isinstance(method, EqualFreq):\n            name = \"(equal frequency k={})\".format(method.k)\n        elif isinstance(method, EqualWidth):\n            name = \"(equal width k={})\".format(method.k)\n        elif isinstance(method, Remove):\n            name = \"(removed)\"\n        elif isinstance(method, Custom):\n            name = \"(custom)\"\n        else:\n            assert False\n\n        if name is not None:\n            return points + \" \" + name\n        else:\n            return points\n\n\n#: Discretization methods\nclass Methods(IntEnum):\n    Default, Leave, MDL, EqualFreq, EqualWidth, Remove, Custom = range(7)\n\n    @staticmethod\n    def from_method(method):\n        return Methods[type(method).__name__]\n\n\ndef parse_float(string: str) -> Optional[float]:\n    try:\n        return float(string)\n    except ValueError:\n        return None\n\n\nclass IncreasingNumbersListValidator(QValidator):\n    \"\"\"\n    Match a comma separated list of non-empty and increasing number strings.\n\n    Example\n    -------\n    >>> v = IncreasingNumbersListValidator()\n    >>> v.validate(\"\", 0)   # Acceptable\n    (2, '', 0)\n    >>> v.validate(\"1\", 1)  # Acceptable\n    (2, '1', 1)\n    >>> v.validate(\"1,,\", 1)  # Intermediate\n    (1, '1,,', 1)\n    \"\"\"\n    @staticmethod\n    def itersplit(string: str) -> Iterable[Tuple[int, int]]:\n        sepiter = re.finditer(r\"(?<!\\\\),\", string)\n        start = 0\n        for match in sepiter:\n            yield start, match.start()\n            start = match.end()\n        # yield the rest if any\n        if start < len(string):\n            yield start, len(string)\n\n    def validate(self, string: str, pos: int) -> Tuple[QValidator.State, str, int]:\n        state = QValidator.Acceptable\n        # Matches non-complete intermediate numbers (while editing)\n        intermediate = re.compile(r\"([+-]?\\s?\\d*\\s?\\d*\\.?\\d*\\s?\\d*)\")\n        values = []\n        for start, end in self.itersplit(string):\n            valuestr = string[start:end].strip()\n            if not valuestr:\n                state = min(state, QValidator.Intermediate)\n                # Middle element is empty\n                continue\n            value = parse_float(valuestr)\n            if value is None:\n                if intermediate.fullmatch(valuestr):\n                    state = min(state, QValidator.Intermediate)\n                    continue\n                return QValidator.Invalid, string, pos\n            if values and value <= values[-1]:\n                state = min(state, QValidator.Intermediate)\n            else:\n                values.append(value)\n        return state, string, pos\n\n    def fixup(self, string):\n        # type: (str) -> str\n        \"\"\"\n        Fixup the input. Remove empty parts from the string.\n        \"\"\"\n        parts = [string[start: end] for start, end in self.itersplit(string)]\n        parts = [part for part in parts if part.strip()]\n        return \", \".join(parts)\n\n\ndef show_tip(\n        widget: QWidget, pos: QPoint, text: str, timeout=-1,\n        textFormat=Qt.AutoText, wordWrap=None\n):\n    propname = __name__ + \"::show_tip_qlabel\"\n    if timeout < 0:\n        timeout = widget.toolTipDuration()\n    if timeout < 0:\n        timeout = 5000 + 40 * max(0, len(text) - 100)\n    tip = widget.property(propname)\n    if not text and tip is None:\n        return\n\n    def hide():\n        w = tip.parent()\n        w.setProperty(propname, None)\n        tip.timer.stop()\n        tip.close()\n        tip.deleteLater()\n\n    if not isinstance(tip, QLabel):\n        tip = QLabel(objectName=\"tip-label\", focusPolicy=Qt.NoFocus)\n        tip.setBackgroundRole(QPalette.ToolTipBase)\n        tip.setForegroundRole(QPalette.ToolTipText)\n        tip.setPalette(QToolTip.palette())\n        tip.setFont(QApplication.font(\"QTipLabel\"))\n        tip.timer = QTimer(tip, singleShot=True, objectName=\"hide-timer\")\n        tip.timer.timeout.connect(hide)\n        widget.setProperty(propname, tip)\n        tip.setParent(widget, Qt.ToolTip)\n\n    tip.setText(text)\n    tip.setTextFormat(textFormat)\n    if wordWrap is None:\n        wordWrap = textFormat != Qt.PlainText\n    tip.setWordWrap(wordWrap)\n\n    if not text:\n        hide()\n    else:\n        tip.timer.start(timeout)\n        tip.show()\n        tip.move(pos)\n\n\nclass OWDiscretize(widget.OWWidget):\n    # pylint: disable=too-many-instance-attributes\n    name = \"Discretize\"\n    description = \"Discretize the numeric data features.\"\n    icon = \"icons/Discretize.svg\"\n    keywords = []\n\n    class Inputs:\n        data = Input(\"Data\", Orange.data.Table, doc=\"Input data table\")\n\n    class Outputs:\n        data = Output(\"Data\", Orange.data.Table, doc=\"Table with discretized features\")\n\n    settingsHandler = settings.DomainContextHandler()\n    settings_version = 2\n    saved_var_states = settings.ContextSetting({})\n\n    #: The default method name\n    default_method_name = settings.Setting(Methods.EqualFreq.name)\n    #: The k for Equal{Freq,Width}\n    default_k = settings.Setting(3)\n    #: The default cut points for custom entry\n    default_cutpoints: Tuple[float, ...] = settings.Setting(())\n    autosend = settings.Setting(True)\n\n    #: Discretization methods\n    Default, Leave, MDL, EqualFreq, EqualWidth, Remove, Custom = list(Methods)\n\n    want_main_area = False\n    resizing_enabled = False\n\n    def __init__(self):\n        super().__init__()\n\n        #: input data\n        self.data = None\n        self.class_var = None\n        #: Current variable discretization state\n        self.var_state = {}\n        #: Saved variable discretization settings (context setting)\n        self.saved_var_states = {}\n\n        self.method = Methods.Default\n        self.k = 5\n        self.cutpoints = ()\n        self.default_cutpoints = ()\n\n        box = gui.vBox(self.controlArea, self.tr(\"Default Discretization\"))\n        self._default_method_ = 0\n        self.default_bbox = rbox = gui.radioButtons(\n            box, self, \"_default_method_\", callback=self._default_disc_changed)\n        self.default_button_group = bg = rbox.findChild(QButtonGroup)\n        bg.buttonClicked[int].connect(self.set_default_method)\n\n        rb = gui.hBox(rbox)\n        self.left = gui.vBox(rb)\n        right = gui.vBox(rb)\n        rb.layout().setStretch(0, 1)\n        rb.layout().setStretch(1, 1)\n        self.options = [\n            (Methods.Default, self.tr(\"Default\")),\n            (Methods.Leave, self.tr(\"Leave numeric\")),\n            (Methods.MDL, self.tr(\"Entropy-MDL discretization\")),\n            (Methods.EqualFreq, self.tr(\"Equal-frequency discretization\")),\n            (Methods.EqualWidth, self.tr(\"Equal-width discretization\")),\n            (Methods.Remove, self.tr(\"Remove numeric variables\")),\n            (Methods.Custom, self.tr(\"Manual\")),\n        ]\n\n        for id_, opt in self.options[1:]:\n            t = gui.appendRadioButton(rbox, opt)\n            bg.setId(t, id_)\n            t.setChecked(id_ == self.default_method)\n            [right, self.left][opt.startswith(\"Equal\")].layout().addWidget(t)\n\n        def _intbox(parent, attr, callback):\n            box = gui.indentedBox(parent)\n            s = gui.spin(\n                box, self, attr, minv=2, maxv=10, label=\"Num. of intervals:\",\n                callback=callback)\n            s.setMaximumWidth(60)\n            s.setAlignment(Qt.AlignRight)\n            gui.rubber(s.box)\n            sp = box.sizePolicy()\n            sp.setControlType(sp.SpinBox)\n            return box.box\n\n        self.k_general = _intbox(self.left, \"default_k\",\n                                 self._default_disc_changed)\n        self.k_general.layout().setContentsMargins(0, 0, 0, 0)\n\n        def manual_cut_editline(text=\"\") -> QLineEdit:\n            edit = QLineEdit(\n                text=text,\n                placeholderText=\"e.g. 0.0, 0.5, 1.0\",\n                toolTip=\"Enter fixed discretization cut points (a comma \"\n                        \"separated list of strictly increasing numbers e.g. \"\n                        \"0.0, 0.5, 1.0).\",\n            )\n            @edit.textChanged.connect\n            def update():\n                validator = edit.validator()\n                if validator is not None:\n                    state, _, _ = validator.validate(edit.text(), 0)\n                else:\n                    state = QValidator.Acceptable\n                palette = edit.palette()\n                colors = {\n                    QValidator.Intermediate: (Qt.yellow, Qt.black),\n                    QValidator.Invalid: (Qt.red, Qt.black),\n                }.get(state, None)\n                if colors is None:\n                    palette = QPalette()\n                else:\n                    palette.setColor(QPalette.Base, colors[0])\n                    palette.setColor(QPalette.Text, colors[1])\n\n                cr = edit.cursorRect()\n                p = edit.mapToGlobal(cr.bottomRight())\n                edit.setPalette(palette)\n                if state != QValidator.Acceptable and edit.isVisible():\n                    show_tip(edit, p, edit.toolTip(), textFormat=Qt.RichText)\n                else:\n                    show_tip(edit, p, \"\")\n            return edit\n\n        self.manual_cuts_edit = manual_cut_editline(\n            text=\", \".join(map(str, self.default_cutpoints))\n        )\n\n        def set_manual_default_cuts():\n            text = self.manual_cuts_edit.text()\n            self.default_cutpoints = tuple(\n                float(s.strip()) for s in text.split(\",\") if s.strip())\n            self._default_disc_changed()\n        self.manual_cuts_edit.editingFinished.connect(set_manual_default_cuts)\n\n        validator = IncreasingNumbersListValidator()\n        self.manual_cuts_edit.setValidator(validator)\n        ibox = gui.indentedBox(right, orientation=Qt.Horizontal)\n        ibox.layout().addWidget(self.manual_cuts_edit)\n\n        right.layout().addStretch(10)\n        self.left.layout().addStretch(10)\n\n        self.connect_control(\n            \"default_cutpoints\",\n            lambda values: self.manual_cuts_edit.setText(\", \".join(map(str, values)))\n        )\n        vlayout = QHBoxLayout()\n        box = gui.widgetBox(\n            self.controlArea, \"Individual Attribute Settings\",\n            orientation=vlayout, spacing=8\n        )\n\n        # List view with all attributes\n        self.varview = QListView(\n            selectionMode=QListView.ExtendedSelection,\n            uniformItemSizes=True,\n        )\n        self.varview.setItemDelegate(DiscDelegate())\n        self.varmodel = itemmodels.VariableListModel()\n        self.varview.setModel(self.varmodel)\n        self.varview.selectionModel().selectionChanged.connect(\n            self._var_selection_changed\n        )\n\n        vlayout.addWidget(self.varview)\n        # Controls for individual attr settings\n        self.bbox = controlbox = gui.radioButtons(\n            box, self, \"method\", callback=self._disc_method_changed\n        )\n        vlayout.addWidget(controlbox)\n        self.variable_button_group = bg = controlbox.findChild(QButtonGroup)\n        for id_, opt in self.options[:5]:\n            b = gui.appendRadioButton(controlbox, opt)\n            bg.setId(b, id_)\n\n        self.k_specific = _intbox(controlbox, \"k\", self._disc_method_changed)\n\n        gui.appendRadioButton(controlbox, \"Remove attribute\", id=Methods.Remove)\n        b = gui.appendRadioButton(controlbox, \"Manual\", id=Methods.Custom)\n\n        self.manual_cuts_specific = manual_cut_editline()\n        self.manual_cuts_specific.setValidator(validator)\n        b.toggled[bool].connect(self.manual_cuts_specific.setEnabled)\n\n        def set_manual_cuts():\n            text = self.manual_cuts_specific.text()\n            points = [t for t in text.split(\",\") if t.split()]\n            self.cutpoints = tuple(float(t) for t in points)\n            self._disc_method_changed()\n        self.manual_cuts_specific.editingFinished.connect(set_manual_cuts)\n\n        self.connect_control(\n            \"cutpoints\",\n            lambda values: self.manual_cuts_specific.setText(\", \".join(map(str, values)))\n        )\n        ibox = gui.indentedBox(controlbox, orientation=Qt.Horizontal)\n        self.copy_current_to_manual_button = b = FixedSizeButton(\n            text=\"CC\", toolTip=\"Copy the current cut points to manual mode\",\n            enabled=False\n        )\n        b.clicked.connect(self._copy_to_manual)\n        ibox.layout().addWidget(self.manual_cuts_specific)\n        ibox.layout().addWidget(b)\n\n        gui.rubber(controlbox)\n        controlbox.setEnabled(False)\n        bg.button(self.method)\n        self.controlbox = controlbox\n\n        box = gui.auto_apply(self.controlArea, self, \"autosend\")\n        box.button.setFixedWidth(180)\n        box.layout().insertStretch(0)\n\n        self._update_spin_positions()\n\n        self.info.set_input_summary(self.info.NoInput)\n        self.info.set_output_summary(self.info.NoOutput)\n\n    @property\n    def default_method(self) -> Methods:\n        return Methods[self.default_method_name]\n\n    @default_method.setter\n    def default_method(self, method):\n        self.set_default_method(method)\n\n    def set_default_method(self, method: Methods):\n        if isinstance(method, int):\n            method = Methods(method)\n        else:\n            method = Methods.from_method(method)\n\n        if method != self.default_method:\n            self.default_method_name = method.name\n            self.default_button_group.button(method).setChecked(True)\n            self._default_disc_changed()\n\n    @Inputs.data\n    def set_data(self, data):\n        self.closeContext()\n        self.data = data\n        if self.data is not None:\n            self._initialize(data)\n            self.openContext(data)\n            # Restore the per variable discretization settings\n            self._restore(self.saved_var_states)\n            # Complete the induction of cut points\n            self._update_points()\n            self.info.set_input_summary(len(data),\n                                        format_summary_details(data))\n        else:\n            self.info.set_input_summary(self.info.NoInput)\n            self._clear()\n        self.unconditional_commit()\n\n    def _initialize(self, data):\n        # Initialize the default variable states for new data.\n        self.class_var = data.domain.class_var\n        cvars = [var for var in data.domain.variables\n                 if var.is_continuous]\n        self.varmodel[:] = cvars\n\n        has_disc_class = data.domain.has_discrete_class\n\n        def set_enabled(box: QWidget, id_: Methods, state: bool):\n            bg = box.findChild(QButtonGroup)\n            b = bg.button(id_)\n            b.setEnabled(state)\n\n        set_enabled(self.default_bbox, self.MDL, has_disc_class)\n        bg = self.bbox.findChild(QButtonGroup)\n        b = bg.button(Methods.MDL)\n        b.setEnabled(has_disc_class)\n        set_enabled(self.bbox, self.MDL, has_disc_class)\n\n        # If the newly disabled MDL button is checked then change it\n        if not has_disc_class and self.default_method == self.MDL:\n            self.default_method = Methods.Leave\n        if not has_disc_class and self.method == self.MDL:\n            self.method = Methods.Default\n\n        # Reset (initialize) the variable discretization states.\n        self._reset()\n\n    def _restore(self, saved_state):\n        # Restore variable states from a saved_state dictionary.\n        def_method = self._current_default_method()\n        for i, var in enumerate(self.varmodel):\n            key = variable_key(var)\n            if key in saved_state:\n                state = saved_state[key]\n                if isinstance(state.method, Default):\n                    state = DState(Default(def_method), None, None)\n                self._set_var_state(i, state)\n\n    def _reset(self):\n        # restore the individual variable settings back to defaults.\n        def_method = self._current_default_method()\n        self.var_state = {}\n        for i in range(len(self.varmodel)):\n            state = DState(Default(def_method), None, None)\n            self._set_var_state(i, state)\n\n    def _set_var_state(self, index, state):\n        # set the state of variable at `index` to `state`.\n        self.var_state[index] = state\n        self.varmodel.setData(self.varmodel.index(index), state, Qt.UserRole)\n\n    def _clear(self):\n        self.data = None\n        self.varmodel[:] = []\n        self.var_state = {}\n        self.saved_var_states = {}\n        self.default_button_group.button(self.MDL).setEnabled(True)\n        self.variable_button_group.button(self.MDL).setEnabled(True)\n\n    def _update_points(self):\n        \"\"\"\n        Update the induced cut points.\n        \"\"\"\n        if self.data is None:\n            return\n\n        def induce_cuts(method, data, var):\n            dvar = _dispatch[type(method)](method, data, var)\n            if dvar is None:\n                # removed\n                return [], None\n            elif dvar is var:\n                # no transformation took place\n                return None, var\n            elif is_discretized(dvar):\n                return dvar.compute_value.points, dvar\n            raise ValueError\n\n        for i, var in enumerate(self.varmodel):\n            state = self.var_state[i]\n            if state.points is None and state.disc_var is None:\n                points, dvar = induce_cuts(state.method, self.data, var)\n                new_state = state._replace(points=points, disc_var=dvar)\n                self._set_var_state(i, new_state)\n\n    def _current_default_method(self):\n        method = self.default_method\n        k = self.default_k\n        if method == Methods.Leave:\n            def_method = Leave()\n        elif method == Methods.MDL:\n            def_method = MDL()\n        elif method == Methods.EqualFreq:\n            def_method = EqualFreq(k)\n        elif method == Methods.EqualWidth:\n            def_method = EqualWidth(k)\n        elif method == Methods.Remove:\n            def_method = Remove()\n        elif method == Methods.Custom:\n            def_method = Custom(self.default_cutpoints)\n        else:\n            assert False\n        return def_method\n\n    def _current_method(self):\n        if self.method == Methods.Default:\n            method = Default(self._current_default_method())\n        elif self.method == Methods.Leave:\n            method = Leave()\n        elif self.method == Methods.MDL:\n            method = MDL()\n        elif self.method == Methods.EqualFreq:\n            method = EqualFreq(self.k)\n        elif self.method == Methods.EqualWidth:\n            method = EqualWidth(self.k)\n        elif self.method == Methods.Remove:\n            method = Remove()\n        elif self.method == Methods.Custom:\n            method = Custom(self.cutpoints)\n        else:\n            assert False\n        return method\n\n    def _update_spin_positions(self):\n        kmethods = [Methods.EqualFreq, Methods.EqualWidth]\n        self.k_general.setDisabled(self.default_method not in kmethods)\n        if self.default_method == Methods.EqualFreq:\n            self.left.layout().insertWidget(1, self.k_general)\n        elif self.default_method == Methods.EqualWidth:\n            self.left.layout().insertWidget(2, self.k_general)\n\n        self.k_specific.setDisabled(self.method not in kmethods)\n        if self.method == Methods.EqualFreq:\n            self.bbox.layout().insertWidget(4, self.k_specific)\n        elif self.method == Methods.EqualWidth:\n            self.bbox.layout().insertWidget(5, self.k_specific)\n\n    def _default_disc_changed(self):\n        self._update_spin_positions()\n        method = self._current_default_method()\n        state = DState(Default(method), None, None)\n        for i, _ in enumerate(self.varmodel):\n            if isinstance(self.var_state[i].method, Default):\n                self._set_var_state(i, state)\n        self._update_points()\n        self.commit()\n\n    def _disc_method_changed(self):\n        self._update_spin_positions()\n        indices = self.selected_indices()\n        method = self._current_method()\n        state = DState(method, None, None)\n        for idx in indices:\n            self._set_var_state(idx, state)\n        self._update_points()\n        self._copy_to_manual_update_enabled()\n        self.commit()\n\n    def _copy_to_manual(self):\n        indices = self.selected_indices()\n        # set of all methods for the current selection\n        if len(indices) != 1:\n            return\n        index = indices[0]\n        state = self.var_state[index]\n        points = state.points\n        if points is None:\n            points = ()\n        else:\n            points = tuple(state.points)\n        state = state._replace(method=Custom(points), points=None, disc_var=None)\n        self._set_var_state(index, state)\n        self.method = Methods.Custom\n        self.cutpoints = points\n        self._update_points()\n        self.commit()\n\n    def _copy_to_manual_update_enabled(self):\n        indices = self.selected_indices()\n        methods = [self.var_state[i].method for i in indices]\n        self.copy_current_to_manual_button.setEnabled(\n            len(indices) == 1 and not isinstance(methods[0], Custom))\n\n    def _var_selection_changed(self, *_):\n        self._copy_to_manual_update_enabled()\n        indices = self.selected_indices()\n        # set of all methods for the current selection\n        methods = [self.var_state[i].method for i in indices]\n\n        def key(method):\n            if isinstance(method, Default):\n                return Default, (None, )\n            return type(method), tuple(method)\n\n        mset = list(unique_everseen(methods, key=key))\n\n        self.controlbox.setEnabled(len(mset) > 0)\n        if len(mset) == 1:\n            method = mset.pop()\n            self.method = Methods.from_method(method)\n            if isinstance(method, (EqualFreq, EqualWidth)):\n                self.k = method.k\n            elif isinstance(method, Custom):\n                self.cutpoints = method.points\n        else:\n            # deselect the current button\n            self.method = -1\n            bg = self.controlbox.group\n            button_group_reset(bg)\n        self._update_spin_positions()\n\n    def selected_indices(self):\n        rows = self.varview.selectionModel().selectedRows()\n        return [index.row() for index in rows]\n\n    def method_for_index(self, index):\n        state = self.var_state[index]\n        return state.method\n\n    def discretized_var(self, index):\n        # type: (int) -> Optional[Orange.data.DiscreteVariable]\n        state = self.var_state[index]\n        if state.disc_var is not None and state.points == []:\n            # Removed by MDL Entropy\n            return None\n        else:\n            return state.disc_var\n\n    def discretized_domain(self):\n        \"\"\"\n        Return the current effective discretized domain.\n        \"\"\"\n        if self.data is None:\n            return None\n\n        # a mapping of all applied changes for variables in `varmodel`\n        mapping = {var: self.discretized_var(i)\n                   for i, var in enumerate(self.varmodel)}\n\n        def disc_var(source):\n            return mapping.get(source, source)\n\n        # map the full input domain to the new variables (where applicable)\n        attributes = [disc_var(v) for v in self.data.domain.attributes]\n        attributes = [v for v in attributes if v is not None]\n\n        class_vars = [disc_var(v) for v in self.data.domain.class_vars]\n        class_vars = [v for v in class_vars if v is not None]\n\n        domain = Orange.data.Domain(\n            attributes, class_vars, metas=self.data.domain.metas\n        )\n        return domain\n\n    def commit(self):\n        output = None\n        if self.data is not None:\n            domain = self.discretized_domain()\n            output = self.data.transform(domain)\n\n        summary = len(output) if output else self.info.NoOutput\n        details = format_summary_details(output) if output else \"\"\n        self.info.set_output_summary(summary, details)\n        self.Outputs.data.send(output)\n\n    def storeSpecificSettings(self):\n        super().storeSpecificSettings()\n        self.saved_var_states = {\n            variable_key(var):\n                self.var_state[i]._replace(points=None, disc_var=None)\n            for i, var in enumerate(self.varmodel)\n        }\n\n    def send_report(self):\n        self.report_items((\n            (\"Default method\", self.options[self.default_method][1]),))\n        if self.varmodel:\n            self.report_items(\"Thresholds\", [\n                (var.name,\n                 DiscDelegate.cutsText(self.var_state[i]) or \"leave numeric\")\n                for i, var in enumerate(self.varmodel)])\n\n    @classmethod\n    def migrate_settings(cls, settings, version):  # pylint: disable=redefined-outer-name\n        if version is None or version < 2:\n            # was stored as int indexing Methods (but offset by 1)\n            default = settings.pop(\"default_method\", 0)\n            default = Methods(default + 1)\n            settings[\"default_method_name\"] = default.name\n\n\nif __name__ == \"__main__\":  # pragma: no cover\n    WidgetPreview(OWDiscretize).run(Orange.data.Table(\"brown-selected\"))\n"}
A user will ask you to solve a task. You should first draft your thinking process (inner monologue). Then, generate the solution.

Your response format must follow the template below:
<think>
Your thoughts or/and draft, like working through an exercise on scratch paper. Be as casual and as long as you want until you are confident to generate a correct solution.
</think>
<solution>
Final solution presented to the user.
</solution>
system
We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[ISSUE]
**Title:** Validator incorrectly marks empty parts as Intermediate instead of Acceptable

**Description:**
When validating input strings that contain empty parts, the `IncreasingNumbersListValidator` incorrectly assigns an `Intermediate` state, causing related validations to fail.

**Example Buggy Code:**
```python
v = IncreasingNumbersListValidator()
result = v.validate(",", 0)
print(result)  # Expected: (v.Acceptable, ',', 0)
              # Actual: (v.Intermediate, ',', 0)
```

**Expected Behavior:**
The validator should recognize empty parts in the input string as acceptable, returning an `Acceptable` state.

**Actual Behavior:**
Empty parts are incorrectly marked as `Intermediate`, leading to unexpected validation failures.
[/ISSUE]
--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.

--- BEGIN FILE ---
```
### Orange/widgets/data/owdiscretize.py
import re
from enum import IntEnum
from collections import namedtuple
from typing import Optional, Tuple, Iterable

from AnyQt.QtWidgets import (
    QListView, QHBoxLayout, QStyledItemDelegate, QButtonGroup, QWidget,
    QLineEdit, QToolTip, QLabel, QApplication
)
from AnyQt.QtGui import QValidator, QPalette
from AnyQt.QtCore import Qt, QTimer, QPoint

import Orange.data
import Orange.preprocess.discretize as disc

from Orange.widgets import widget, gui, settings
from Orange.widgets.utils import itemmodels, vartype, unique_everseen
from Orange.widgets.utils.widgetpreview import WidgetPreview
from Orange.widgets.utils.state_summary import format_summary_details
from Orange.widgets.widget import Input, Output
from Orange.widgets.data.oweditdomain import FixedSizeButton

__all__ = ["OWDiscretize"]

# 'Default' method delegates to 'method'
Default = namedtuple("Default", ["method"])
Leave = namedtuple("Leave", [])
MDL = namedtuple("MDL", [])
EqualFreq = namedtuple("EqualFreq", ["k"])
EqualWidth = namedtuple("EqualWidth", ["k"])
Remove = namedtuple("Remove", [])
Custom = namedtuple("Custom", ["points"])

METHODS = [
    (Default, ),
    (Leave, ),
    (MDL, ),
    (EqualFreq, ),
    (EqualWidth, ),
    (Remove, ),
    (Custom, )
]

_dispatch = {
    Default:
        lambda m, data, var: _dispatch[type(m.method)](m.method, data, var),
    Leave: lambda m, data, var: var,
    MDL: lambda m, data, var: disc.EntropyMDL()(data, var),
    EqualFreq: lambda m, data, var: disc.EqualFreq(m.k)(data, var),
    EqualWidth: lambda m, data, var: disc.EqualWidth(m.k)(data, var),
    Remove: lambda m, data, var: None,
    Custom:
        lambda m, data, var:
        disc.Discretizer.create_discretized_var(var, m.points)
}


# Variable discretization state
DState = namedtuple(
    "DState",
    ["method",    # discretization method
     "points",    # induced cut points
     "disc_var"]  # induced discretized variable
)


def is_derived(var):
    return var.compute_value is not None


def is_discretized(var):
    return isinstance(var.compute_value, disc.Discretizer)


def variable_key(var):
    return vartype(var), var.name


def button_group_reset(group):
    button = group.checkedButton()
    if button is not None:
        group.setExclusive(False)
        button.setChecked(False)
        group.setExclusive(True)


class DiscDelegate(QStyledItemDelegate):
    def initStyleOption(self, option, index):
        super().initStyleOption(option, index)
        state = index.data(Qt.UserRole)

        if state is not None:
            extra = self.cutsText(state)
            option.text = option.text + ": " + extra

    @staticmethod
    def cutsText(state):
        # This function has many branches, but they don't hurt readabability
        # pylint: disable=too-many-branches
        method = state.method
        name = None
        # Need a better way to distinguish discretization states
        # i.e. between 'induced no points v.s. 'removed by choice'
        if state.points is None and state.disc_var is not None:
            points = ""
        elif state.points is None:
            points = "..."
        elif state.points == []:
            points = "<removed>"
        else:
            points = ", ".join(map("{:.2f}".format, state.points))

        if isinstance(method, Default):
            name = None
        elif isinstance(method, Leave):
            name = "(leave)"
        elif isinstance(method, MDL):
            name = "(entropy)"
        elif isinstance(method, EqualFreq):
            name = "(equal frequency k={})".format(method.k)
        elif isinstance(method, EqualWidth):
            name = "(equal width k={})".format(method.k)
        elif isinstance(method, Remove):
            name = "(removed)"
        elif isinstance(method, Custom):
            name = "(custom)"
        else:
            assert False

        if name is not None:
            return points + " " + name
        else:
            return points


#: Discretization methods
class Methods(IntEnum):
    Default, Leave, MDL, EqualFreq, EqualWidth, Remove, Custom = range(7)

    @staticmethod
    def from_method(method):
        return Methods[type(method).__name__]


def parse_float(string: str) -> Optional[float]:
    try:
        return float(string)
    except ValueError:
        return None


class IncreasingNumbersListValidator(QValidator):
    """
    Match a comma separated list of non-empty and increasing number strings.

    Example
    -------
    >>> v = IncreasingNumbersListValidator()
    >>> v.validate("", 0)   # Acceptable
    (2, '', 0)
    >>> v.validate("1", 1)  # Acceptable
    (2, '1', 1)
    >>> v.validate("1,,", 1)  # Intermediate
    (1, '1,,', 1)
    """
    @staticmethod
    def itersplit(string: str) -> Iterable[Tuple[int, int]]:
        sepiter = re.finditer(r"(?<!\\),", string)
        start = 0
        for match in sepiter:
            yield start, match.start()
            start = match.end()
        # yield the rest if any
        if start < len(string):
            yield start, len(string)

    def validate(self, string: str, pos: int) -> Tuple[QValidator.State, str, int]:
        state = QValidator.Acceptable
        # Matches non-complete intermediate numbers (while editing)
        intermediate = re.compile(r"([+-]?\s?\d*\s?\d*\.?\d*\s?\d*)")
        values = []
        for start, end in self.itersplit(string):
            valuestr = string[start:end].strip()
            if not valuestr:
                state = min(state, QValidator.Intermediate)
                # Middle element is empty
                continue
            value = parse_float(valuestr)
            if value is None:
                if intermediate.fullmatch(valuestr):
                    state = min(state, QValidator.Intermediate)
                    continue
                return QValidator.Invalid, string, pos
            if values and value <= values[-1]:
                state = min(state, QValidator.Intermediate)
            else:
                values.append(value)
        return state, string, pos

    def fixup(self, string):
        # type: (str) -> str
        """
        Fixup the input. Remove empty parts from the string.
        """
        parts = [string[start: end] for start, end in self.itersplit(string)]
        parts = [part for part in parts if part.strip()]
        return ", ".join(parts)


def show_tip(
        widget: QWidget, pos: QPoint, text: str, timeout=-1,
        textFormat=Qt.AutoText, wordWrap=None
):
    propname = __name__ + "::show_tip_qlabel"
    if timeout < 0:
        timeout = widget.toolTipDuration()
    if timeout < 0:
        timeout = 5000 + 40 * max(0, len(text) - 100)
    tip = widget.property(propname)
    if not text and tip is None:
        return

    def hide():
        w = tip.parent()
        w.setProperty(propname, None)
        tip.timer.stop()
        tip.close()
        tip.deleteLater()

    if not isinstance(tip, QLabel):
        tip = QLabel(objectName="tip-label", focusPolicy=Qt.NoFocus)
        tip.setBackgroundRole(QPalette.ToolTipBase)
        tip.setForegroundRole(QPalette.ToolTipText)
        tip.setPalette(QToolTip.palette())
        tip.setFont(QApplication.font("QTipLabel"))
        tip.timer = QTimer(tip, singleShot=True, objectName="hide-timer")
        tip.timer.timeout.connect(hide)
        widget.setProperty(propname, tip)
        tip.setParent(widget, Qt.ToolTip)

    tip.setText(text)
    tip.setTextFormat(textFormat)
    if wordWrap is None:
        wordWrap = textFormat != Qt.PlainText
    tip.setWordWrap(wordWrap)

    if not text:
        hide()
    else:
        tip.timer.start(timeout)
        tip.show()
        tip.move(pos)


class OWDiscretize(widget.OWWidget):
    # pylint: disable=too-many-instance-attributes
    name = "Discretize"
    description = "Discretize the numeric data features."
    icon = "icons/Discretize.svg"
    keywords = []

    class Inputs:
        data = Input("Data", Orange.data.Table, doc="Input data table")

    class Outputs:
        data = Output("Data", Orange.data.Table, doc="Table with discretized features")

    settingsHandler = settings.DomainContextHandler()
    settings_version = 2
    saved_var_states = settings.ContextSetting({})

    #: The default method name
    default_method_name = settings.Setting(Methods.EqualFreq.name)
    #: The k for Equal{Freq,Width}
    default_k = settings.Setting(3)
    #: The default cut points for custom entry
    default_cutpoints: Tuple[float, ...] = settings.Setting(())
    autosend = settings.Setting(True)

    #: Discretization methods
    Default, Leave, MDL, EqualFreq, EqualWidth, Remove, Custom = list(Methods)

    want_main_area = False
    resizing_enabled = False

    def __init__(self):
        super().__init__()

        #: input data
        self.data = None
        self.class_var = None
        #: Current variable discretization state
        self.var_state = {}
        #: Saved variable discretization settings (context setting)
        self.saved_var_states = {}

        self.method = Methods.Default
        self.k = 5
        self.cutpoints = ()
        self.default_cutpoints = ()

        box = gui.vBox(self.controlArea, self.tr("Default Discretization"))
        self._default_method_ = 0
        self.default_bbox = rbox = gui.radioButtons(
            box, self, "_default_method_", callback=self._default_disc_changed)
        self.default_button_group = bg = rbox.findChild(QButtonGroup)
        bg.buttonClicked[int].connect(self.set_default_method)

        rb = gui.hBox(rbox)
        self.left = gui.vBox(rb)
        right = gui.vBox(rb)
        rb.layout().setStretch(0, 1)
        rb.layout().setStretch(1, 1)
        self.options = [
            (Methods.Default, self.tr("Default")),
            (Methods.Leave, self.tr("Leave numeric")),
            (Methods.MDL, self.tr("Entropy-MDL discretization")),
            (Methods.EqualFreq, self.tr("Equal-frequency discretization")),
            (Methods.EqualWidth, self.tr("Equal-width discretization")),
            (Methods.Remove, self.tr("Remove numeric variables")),
            (Methods.Custom, self.tr("Manual")),
        ]

        for id_, opt in self.options[1:]:
            t = gui.appendRadioButton(rbox, opt)
            bg.setId(t, id_)
            t.setChecked(id_ == self.default_method)
            [right, self.left][opt.startswith("Equal")].layout().addWidget(t)

        def _intbox(parent, attr, callback):
            box = gui.indentedBox(parent)
            s = gui.spin(
                box, self, attr, minv=2, maxv=10, label="Num. of intervals:",
                callback=callback)
            s.setMaximumWidth(60)
            s.setAlignment(Qt.AlignRight)
            gui.rubber(s.box)
            sp = box.sizePolicy()
            sp.setControlType(sp.SpinBox)
            return box.box

        self.k_general = _intbox(self.left, "default_k",
                                 self._default_disc_changed)
        self.k_general.layout().setContentsMargins(0, 0, 0, 0)

        def manual_cut_editline(text="") -> QLineEdit:
            edit = QLineEdit(
                text=text,
                placeholderText="e.g. 0.0, 0.5, 1.0",
                toolTip="Enter fixed discretization cut points (a comma "
                        "separated list of strictly increasing numbers e.g. "
                        "0.0, 0.5, 1.0).",
            )
            @edit.textChanged.connect
            def update():
                validator = edit.validator()
                if validator is not None:
                    state, _, _ = validator.validate(edit.text(), 0)
                else:
                    state = QValidator.Acceptable
                palette = edit.palette()
                colors = {
                    QValidator.Intermediate: (Qt.yellow, Qt.black),
                    QValidator.Invalid: (Qt.red, Qt.black),
                }.get(state, None)
                if colors is None:
                    palette = QPalette()
                else:
                    palette.setColor(QPalette.Base, colors[0])
                    palette.setColor(QPalette.Text, colors[1])

                cr = edit.cursorRect()
                p = edit.mapToGlobal(cr.bottomRight())
                edit.setPalette(palette)
                if state != QValidator.Acceptable and edit.isVisible():
                    show_tip(edit, p, edit.toolTip(), textFormat=Qt.RichText)
                else:
                    show_tip(edit, p, "")
            return edit

        self.manual_cuts_edit = manual_cut_editline(
            text=", ".join(map(str, self.default_cutpoints))
        )

        def set_manual_default_cuts():
            text = self.manual_cuts_edit.text()
            self.default_cutpoints = tuple(
                float(s.strip()) for s in text.split(",") if s.strip())
            self._default_disc_changed()
        self.manual_cuts_edit.editingFinished.connect(set_manual_default_cuts)

        validator = IncreasingNumbersListValidator()
        self.manual_cuts_edit.setValidator(validator)
        ibox = gui.indentedBox(right, orientation=Qt.Horizontal)
        ibox.layout().addWidget(self.manual_cuts_edit)

        right.layout().addStretch(10)
        self.left.layout().addStretch(10)

        self.connect_control(
            "default_cutpoints",
            lambda values: self.manual_cuts_edit.setText(", ".join(map(str, values)))
        )
        vlayout = QHBoxLayout()
        box = gui.widgetBox(
            self.controlArea, "Individual Attribute Settings",
            orientation=vlayout, spacing=8
        )

        # List view with all attributes
        self.varview = QListView(
            selectionMode=QListView.ExtendedSelection,
            uniformItemSizes=True,
        )
        self.varview.setItemDelegate(DiscDelegate())
        self.varmodel = itemmodels.VariableListModel()
        self.varview.setModel(self.varmodel)
        self.varview.selectionModel().selectionChanged.connect(
            self._var_selection_changed
        )

        vlayout.addWidget(self.varview)
        # Controls for individual attr settings
        self.bbox = controlbox = gui.radioButtons(
            box, self, "method", callback=self._disc_method_changed
        )
        vlayout.addWidget(controlbox)
        self.variable_button_group = bg = controlbox.findChild(QButtonGroup)
        for id_, opt in self.options[:5]:
            b = gui.appendRadioButton(controlbox, opt)
            bg.setId(b, id_)

        self.k_specific = _intbox(controlbox, "k", self._disc_method_changed)

        gui.appendRadioButton(controlbox, "Remove attribute", id=Methods.Remove)
        b = gui.appendRadioButton(controlbox, "Manual", id=Methods.Custom)

        self.manual_cuts_specific = manual_cut_editline()
        self.manual_cuts_specific.setValidator(validator)
        b.toggled[bool].connect(self.manual_cuts_specific.setEnabled)

        def set_manual_cuts():
            text = self.manual_cuts_specific.text()
            points = [t for t in text.split(",") if t.split()]
            self.cutpoints = tuple(float(t) for t in points)
            self._disc_method_changed()
        self.manual_cuts_specific.editingFinished.connect(set_manual_cuts)

        self.connect_control(
            "cutpoints",
            lambda values: self.manual_cuts_specific.setText(", ".join(map(str, values)))
        )
        ibox = gui.indentedBox(controlbox, orientation=Qt.Horizontal)
        self.copy_current_to_manual_button = b = FixedSizeButton(
            text="CC", toolTip="Copy the current cut points to manual mode",
            enabled=False
        )
        b.clicked.connect(self._copy_to_manual)
        ibox.layout().addWidget(self.manual_cuts_specific)
        ibox.layout().addWidget(b)

        gui.rubber(controlbox)
        controlbox.setEnabled(False)
        bg.button(self.method)
        self.controlbox = controlbox

        box = gui.auto_apply(self.controlArea, self, "autosend")
        box.button.setFixedWidth(180)
        box.layout().insertStretch(0)

        self._update_spin_positions()

        self.info.set_input_summary(self.info.NoInput)
        self.info.set_output_summary(self.info.NoOutput)

    @property
    def default_method(self) -> Methods:
        return Methods[self.default_method_name]

    @default_method.setter
    def default_method(self, method):
        self.set_default_method(method)

    def set_default_method(self, method: Methods):
        if isinstance(method, int):
            method = Methods(method)
        else:
            method = Methods.from_method(method)

        if method != self.default_method:
            self.default_method_name = method.name
            self.default_button_group.button(method).setChecked(True)
            self._default_disc_changed()

    @Inputs.data
    def set_data(self, data):
        self.closeContext()
        self.data = data
        if self.data is not None:
            self._initialize(data)
            self.openContext(data)
            # Restore the per variable discretization settings
            self._restore(self.saved_var_states)
            # Complete the induction of cut points
            self._update_points()
            self.info.set_input_summary(len(data),
                                        format_summary_details(data))
        else:
            self.info.set_input_summary(self.info.NoInput)
            self._clear()
        self.unconditional_commit()

    def _initialize(self, data):
        # Initialize the default variable states for new data.
        self.class_var = data.domain.class_var
        cvars = [var for var in data.domain.variables
                 if var.is_continuous]
        self.varmodel[:] = cvars

        has_disc_class = data.domain.has_discrete_class

        def set_enabled(box: QWidget, id_: Methods, state: bool):
            bg = box.findChild(QButtonGroup)
            b = bg.button(id_)
            b.setEnabled(state)

        set_enabled(self.default_bbox, self.MDL, has_disc_class)
        bg = self.bbox.findChild(QButtonGroup)
        b = bg.button(Methods.MDL)
        b.setEnabled(has_disc_class)
        set_enabled(self.bbox, self.MDL, has_disc_class)

        # If the newly disabled MDL button is checked then change it
        if not has_disc_class and self.default_method == self.MDL:
            self.default_method = Methods.Leave
        if not has_disc_class and self.method == self.MDL:
            self.method = Methods.Default

        # Reset (initialize) the variable discretization states.
        self._reset()

    def _restore(self, saved_state):
        # Restore variable states from a saved_state dictionary.
        def_method = self._current_default_method()
        for i, var in enumerate(self.varmodel):
            key = variable_key(var)
            if key in saved_state:
                state = saved_state[key]
                if isinstance(state.method, Default):
                    state = DState(Default(def_method), None, None)
                self._set_var_state(i, state)

    def _reset(self):
        # restore the individual variable settings back to defaults.
        def_method = self._current_default_method()
        self.var_state = {}
        for i in range(len(self.varmodel)):
            state = DState(Default(def_method), None, None)
            self._set_var_state(i, state)

    def _set_var_state(self, index, state):
        # set the state of variable at `index` to `state`.
        self.var_state[index] = state
        self.varmodel.setData(self.varmodel.index(index), state, Qt.UserRole)

    def _clear(self):
        self.data = None
        self.varmodel[:] = []
        self.var_state = {}
        self.saved_var_states = {}
        self.default_button_group.button(self.MDL).setEnabled(True)
        self.variable_button_group.button(self.MDL).setEnabled(True)

    def _update_points(self):
        """
        Update the induced cut points.
        """
        if self.data is None:
            return

        def induce_cuts(method, data, var):
            dvar = _dispatch[type(method)](method, data, var)
            if dvar is None:
                # removed
                return [], None
            elif dvar is var:
                # no transformation took place
                return None, var
            elif is_discretized(dvar):
                return dvar.compute_value.points, dvar
            raise ValueError

        for i, var in enumerate(self.varmodel):
            state = self.var_state[i]
            if state.points is None and state.disc_var is None:
                points, dvar = induce_cuts(state.method, self.data, var)
                new_state = state._replace(points=points, disc_var=dvar)
                self._set_var_state(i, new_state)

    def _current_default_method(self):
        method = self.default_method
        k = self.default_k
        if method == Methods.Leave:
            def_method = Leave()
        elif method == Methods.MDL:
            def_method = MDL()
        elif method == Methods.EqualFreq:
            def_method = EqualFreq(k)
        elif method == Methods.EqualWidth:
            def_method = EqualWidth(k)
        elif method == Methods.Remove:
            def_method = Remove()
        elif method == Methods.Custom:
            def_method = Custom(self.default_cutpoints)
        else:
            assert False
        return def_method

    def _current_method(self):
        if self.method == Methods.Default:
            method = Default(self._current_default_method())
        elif self.method == Methods.Leave:
            method = Leave()
        elif self.method == Methods.MDL:
            method = MDL()
        elif self.method == Methods.EqualFreq:
            method = EqualFreq(self.k)
        elif self.method == Methods.EqualWidth:
            method = EqualWidth(self.k)
        elif self.method == Methods.Remove:
            method = Remove()
        elif self.method == Methods.Custom:
            method = Custom(self.cutpoints)
        else:
            assert False
        return method

    def _update_spin_positions(self):
        kmethods = [Methods.EqualFreq, Methods.EqualWidth]
        self.k_general.setDisabled(self.default_method not in kmethods)
        if self.default_method == Methods.EqualFreq:
            self.left.layout().insertWidget(1, self.k_general)
        elif self.default_method == Methods.EqualWidth:
            self.left.layout().insertWidget(2, self.k_general)

        self.k_specific.setDisabled(self.method not in kmethods)
        if self.method == Methods.EqualFreq:
            self.bbox.layout().insertWidget(4, self.k_specific)
        elif self.method == Methods.EqualWidth:
            self.bbox.layout().insertWidget(5, self.k_specific)

    def _default_disc_changed(self):
        self._update_spin_positions()
        method = self._current_default_method()
        state = DState(Default(method), None, None)
        for i, _ in enumerate(self.varmodel):
            if isinstance(self.var_state[i].method, Default):
                self._set_var_state(i, state)
        self._update_points()
        self.commit()

    def _disc_method_changed(self):
        self._update_spin_positions()
        indices = self.selected_indices()
        method = self._current_method()
        state = DState(method, None, None)
        for idx in indices:
            self._set_var_state(idx, state)
        self._update_points()
        self._copy_to_manual_update_enabled()
        self.commit()

    def _copy_to_manual(self):
        indices = self.selected_indices()
        # set of all methods for the current selection
        if len(indices) != 1:
            return
        index = indices[0]
        state = self.var_state[index]
        points = state.points
        if points is None:
            points = ()
        else:
            points = tuple(state.points)
        state = state._replace(method=Custom(points), points=None, disc_var=None)
        self._set_var_state(index, state)
        self.method = Methods.Custom
        self.cutpoints = points
        self._update_points()
        self.commit()

    def _copy_to_manual_update_enabled(self):
        indices = self.selected_indices()
        methods = [self.var_state[i].method for i in indices]
        self.copy_current_to_manual_button.setEnabled(
            len(indices) == 1 and not isinstance(methods[0], Custom))

    def _var_selection_changed(self, *_):
        self._copy_to_manual_update_enabled()
        indices = self.selected_indices()
        # set of all methods for the current selection
        methods = [self.var_state[i].method for i in indices]

        def key(method):
            if isinstance(method, Default):
                return Default, (None, )
            return type(method), tuple(method)

        mset = list(unique_everseen(methods, key=key))

        self.controlbox.setEnabled(len(mset) > 0)
        if len(mset) == 1:
            method = mset.pop()
            self.method = Methods.from_method(method)
            if isinstance(method, (EqualFreq, EqualWidth)):
                self.k = method.k
            elif isinstance(method, Custom):
                self.cutpoints = method.points
        else:
            # deselect the current button
            self.method = -1
            bg = self.controlbox.group
            button_group_reset(bg)
        self._update_spin_positions()

    def selected_indices(self):
        rows = self.varview.selectionModel().selectedRows()
        return [index.row() for index in rows]

    def method_for_index(self, index):
        state = self.var_state[index]
        return state.method

    def discretized_var(self, index):
        # type: (int) -> Optional[Orange.data.DiscreteVariable]
        state = self.var_state[index]
        if state.disc_var is not None and state.points == []:
            # Removed by MDL Entropy
            return None
        else:
            return state.disc_var

    def discretized_domain(self):
        """
        Return the current effective discretized domain.
        """
        if self.data is None:
            return None

        # a mapping of all applied changes for variables in `varmodel`
        mapping = {var: self.discretized_var(i)
                   for i, var in enumerate(self.varmodel)}

        def disc_var(source):
            return mapping.get(source, source)

        # map the full input domain to the new variables (where applicable)
        attributes = [disc_var(v) for v in self.data.domain.attributes]
        attributes = [v for v in attributes if v is not None]

        class_vars = [disc_var(v) for v in self.data.domain.class_vars]
        class_vars = [v for v in class_vars if v is not None]

        domain = Orange.data.Domain(
            attributes, class_vars, metas=self.data.domain.metas
        )
        return domain

    def commit(self):
        output = None
        if self.data is not None:
            domain = self.discretized_domain()
            output = self.data.transform(domain)

        summary = len(output) if output else self.info.NoOutput
        details = format_summary_details(output) if output else ""
        self.info.set_output_summary(summary, details)
        self.Outputs.data.send(output)

    def storeSpecificSettings(self):
        super().storeSpecificSettings()
        self.saved_var_states = {
            variable_key(var):
                self.var_state[i]._replace(points=None, disc_var=None)
            for i, var in enumerate(self.varmodel)
        }

    def send_report(self):
        self.report_items((
            ("Default method", self.options[self.default_method][1]),))
        if self.varmodel:
            self.report_items("Thresholds", [
                (var.name,
                 DiscDelegate.cutsText(self.var_state[i]) or "leave numeric")
                for i, var in enumerate(self.varmodel)])

    @classmethod
    def migrate_settings(cls, settings, version):  # pylint: disable=redefined-outer-name
        if version is None or version < 2:
            # was stored as int indexing Methods (but offset by 1)
            default = settings.pop("default_method", 0)
            default = Methods(default + 1)
            settings["default_method_name"] = default.name


if __name__ == "__main__":  # pragma: no cover
    WidgetPreview(OWDiscretize).run(Orange.data.Table("brown-selected"))

```
--- END FILE ---

Please first localize the bug based on the issue statement, and then generate *SEARCH/REPLACE* edits to fix the issue.

Every *SEARCH/REPLACE* edit must use this format:
1. The file path
2. The start of search block: <<<<<<< SEARCH
3. A contiguous chunk of lines to search for in the existing source code
4. The dividing line: =======
5. The lines to replace into the source code
6. The end of the replace block: >>>>>>> REPLACE

Here is an example:

```python
### mathweb/flask/app.py
<<<<<<< SEARCH
from flask import Flask
=======
import math
from flask import Flask
>>>>>>> REPLACE
```
</solution>

Please note that the *SEARCH/REPLACE* edit REQUIRES PROPER INDENTATION. If you would like to add the line '        print(x)', you must fully write that out, with all those spaces before the code!
Wrap each *SEARCH/REPLACE* edit in a code block as shown in the example above. If you have multiple *SEARCH/REPLACE* edits, use a separate code block for each one.
user