{
    "file_diffs": [
        {
            "old_file_content": "import sys\nfrom typing import Tuple, List, Dict, Iterable\n\nfrom AnyQt.QtCore import Qt\nfrom AnyQt.QtWidgets import QApplication\nfrom AnyQt.QtGui import QFont, QFontDatabase\n\nimport pyqtgraph as pg\nfrom pyqtgraph.graphicsItems.LegendItem import ItemSample\n\nfrom orangewidget.utils.visual_settings_dlg import KeyType, ValueType, \\\n    SettingsType, FontList\n\n_SettingType = Dict[str, ValueType]\n_LegendItemType = Tuple[ItemSample, pg.LabelItem]\n\n\ndef available_font_families() -> List:\n    \"\"\"\n    Function returns list of available font families.\n    Can be used to instantiate font combo boxes.\n\n    Returns\n    -------\n    fonts: list\n        List of available font families.\n    \"\"\"\n    if not QApplication.instance():\n        _ = QApplication(sys.argv)\n    fonts = QFontDatabase().families()\n    default = fonts.pop(fonts.index(default_font_family()))\n    defaults = [default]\n\n    guessed_name = default.split()[0]\n    i = 0\n    while i < len(fonts):\n        if fonts[i].startswith(guessed_name):\n            defaults.append(fonts.pop(i))\n        else:\n            i += 1\n    return FontList(defaults\n                    + [\"\"]\n                    + sorted(fonts, key=lambda s: s.replace(\".\", \"\")))\n\n\ndef default_font_family() -> str:\n    \"\"\"\n    Function returns default font family used in Qt application.\n    Can be used to instantiate initial dialog state.\n\n    Returns\n    -------\n    font: str\n        Default font family.\n    \"\"\"\n    if not QApplication.instance():\n        _ = QApplication(sys.argv)\n    return QFont().family()\n\n\ndef default_font_size() -> int:\n    \"\"\"\n    Function returns default font size in points used in Qt application.\n    Can be used to instantiate initial dialog state.\n\n    Returns\n    -------\n    size: int\n        Default font size in points.\n    \"\"\"\n    if not QApplication.instance():\n        _ = QApplication(sys.argv)\n    return QFont().pointSize()\n\n\nclass Updater:\n    \"\"\" Class with helper functions and constants. \"\"\"\n    FONT_FAMILY_LABEL, SIZE_LABEL, IS_ITALIC_LABEL = \\\n        \"Font family\", \"Font size\", \"Italic\"\n\n    WIDTH_LABEL, ALPHA_LABEL, STYLE_LABEL, ANTIALIAS_LABEL = \\\n        \"Width\", \"Opacity\", \"Style\", \"Antialias\"\n    LINE_STYLES = {\"Solid line\": Qt.SolidLine,\n                   \"Dash line\": Qt.DashLine,\n                   \"Dot line\": Qt.DotLine,\n                   \"Dash dot line\": Qt.DashDotLine,\n                   \"Dash dot dot line\": Qt.DashDotDotLine}\n    DEFAULT_LINE_STYLE = \"Solid line\"\n\n    @staticmethod\n    def update_plot_title_text(title_item: pg.LabelItem, text: str):\n        title_item.text = text\n        title_item.setVisible(bool(text))\n        title_item.item.setPlainText(text)\n        Updater.plot_title_resize(title_item)\n\n    @staticmethod\n    def update_plot_title_font(title_item: pg.LabelItem,\n                               **settings: _SettingType):\n        font = Updater.change_font(title_item.item.font(), settings)\n        title_item.item.setFont(font)\n        title_item.item.setPlainText(title_item.text)\n        Updater.plot_title_resize(title_item)\n\n    @staticmethod\n    def plot_title_resize(title_item):\n        height = title_item.item.boundingRect().height() + 6 \\\n            if title_item.text else 0\n        title_item.setMaximumHeight(height)\n        title_item.parentItem().layout.setRowFixedHeight(0, height)\n        title_item.resizeEvent(None)\n\n    @staticmethod\n    def update_axis_title_text(item: pg.AxisItem, text: str):\n        item.setLabel(text)\n        item.resizeEvent(None)\n\n    @staticmethod\n    def update_axes_titles_font(items: List[pg.AxisItem],\n                                **settings: _SettingType):\n        for item in items:\n            font = Updater.change_font(item.label.font(), settings)\n            item.label.setFont(font)\n            fstyle = [\"normal\", \"italic\"][font.italic()]\n            style = {\"font-size\": f\"{font.pointSize()}pt\",\n                     \"font-family\": f\"{font.family()}\",\n                     \"font-style\": f\"{fstyle}\"}\n            item.setLabel(None, None, None, **style)\n\n    @staticmethod\n    def update_axes_ticks_font(items: List[pg.AxisItem],\n                               **settings: _SettingType):\n        for item in items:\n            font = item.style[\"tickFont\"] or QFont()\n            # remove when contained in setTickFont() - version 0.11.0\n            item.style['tickFont'] = font\n            item.setTickFont(Updater.change_font(font, settings))\n\n    @staticmethod\n    def update_legend_font(items: Iterable[_LegendItemType],\n                           **settings: _SettingType):\n        for sample, label in items:\n            sample.setFixedHeight(sample.height())\n            sample.setFixedWidth(sample.width())\n            label.item.setFont(Updater.change_font(label.item.font(), settings))\n            bounds = label.itemRect()\n            label.setMaximumWidth(bounds.width())\n            label.setMaximumHeight(bounds.height())\n            label.updateMin()\n            label.resizeEvent(None)\n            label.updateGeometry()\n\n    @staticmethod\n    def update_num_legend_font(legend: pg.LegendItem,\n                               **settings: _SettingType):\n        if not legend:\n            return\n        for sample, _ in legend.items:\n            sample.set_font(Updater.change_font(sample.font, settings))\n            legend.setGeometry(sample.boundingRect())\n\n    @staticmethod\n    def update_label_font(items: List[pg.TextItem], font: QFont):\n        for item in items:\n            item.setFont(font)\n\n    @staticmethod\n    def change_font(font: QFont, settings: _SettingType) -> QFont:\n        assert all(s in (Updater.FONT_FAMILY_LABEL, Updater.SIZE_LABEL,\n                         Updater.IS_ITALIC_LABEL) for s in settings), settings\n\n        family = settings.get(Updater.FONT_FAMILY_LABEL)\n        if family is not None:\n            font.setFamily(family)\n        size = settings.get(Updater.SIZE_LABEL)\n        if size is not None:\n            font.setPointSize(size)\n        italic = settings.get(Updater.IS_ITALIC_LABEL)\n        if italic is not None:\n            font.setItalic(italic)\n        return font\n\n    @staticmethod\n    def update_lines(items: List[pg.PlotCurveItem], **settings: _SettingType):\n        for item in items:\n            antialias = settings.get(Updater.ANTIALIAS_LABEL)\n            if antialias is not None:\n                item.setData(item.xData, item.yData, antialias=antialias)\n\n            pen = item.opts[\"pen\"]\n            alpha = settings.get(Updater.ALPHA_LABEL)\n            if alpha is not None:\n                color = pen.color()\n                color.setAlpha(alpha)\n                pen.setColor(color)\n\n            style = settings.get(Updater.STYLE_LABEL)\n            if style is not None:\n                pen.setStyle(Updater.LINE_STYLES[style])\n\n            width = settings.get(Updater.WIDTH_LABEL)\n            if width is not None:\n                pen.setWidth(width)\n\n            item.setPen(pen)\n\n\nclass CommonParameterSetter:\n    \"\"\" Subclass to add 'setter' functionality to a plot. \"\"\"\n    LABELS_BOX = \"Fonts\"\n    ANNOT_BOX = \"Annotations\"\n    PLOT_BOX = \"Figure\"\n\n    FONT_FAMILY_LABEL = \"Font family\"\n    AXIS_TITLE_LABEL = \"Axis title\"\n    AXIS_TICKS_LABEL = \"Axis ticks\"\n    LEGEND_LABEL = \"Legend\"\n    LABEL_LABEL = \"Label\"\n    X_AXIS_LABEL = \"x-axis title\"\n    Y_AXIS_LABEL = \"y-axis title\"\n    TITLE_LABEL = \"Title\"\n\n    FONT_FAMILY_SETTING = None  # set in __init__ because it requires a running QApplication\n    FONT_SETTING = None  # set in __init__ because it requires a running QApplication\n    LINE_SETTING: SettingsType = {\n        Updater.WIDTH_LABEL: (range(1, 15), 1),\n        Updater.ALPHA_LABEL: (range(0, 255, 5), 255),\n        Updater.STYLE_LABEL: (list(Updater.LINE_STYLES), Updater.DEFAULT_LINE_STYLE),\n        Updater.ANTIALIAS_LABEL: (None, False),\n    }\n\n    def __init__(self):\n        def update_font_family(**settings):\n            # false positive, pylint: disable=unsubscriptable-object\n            for label in self.initial_settings[self.LABELS_BOX]:\n                if label != self.FONT_FAMILY_LABEL:\n                    setter = self._setters[self.LABELS_BOX][label]\n                    setter(**settings)\n\n        def update_title(**settings):\n            Updater.update_plot_title_font(self.title_item, **settings)\n\n        def update_label(**settings):\n            self.label_font = Updater.change_font(self.label_font, settings)\n            Updater.update_label_font(self.labels, self.label_font)\n\n        def update_axes_titles(**settings):\n            Updater.update_axes_titles_font(self.axis_items, **settings)\n\n        def update_axes_ticks(**settings):\n            Updater.update_axes_ticks_font(self.axis_items, **settings)\n\n        def update_legend(**settings):\n            self.legend_settings.update(**settings)\n            Updater.update_legend_font(self.legend_items, **settings)\n\n        def update_title_text(**settings):\n            Updater.update_plot_title_text(\n                self.title_item, settings[self.TITLE_LABEL])\n\n        def update_axis(axis, **settings):\n            Updater.update_axis_title_text(\n                self.getAxis(axis), settings[self.TITLE_LABEL])\n\n        self.FONT_FAMILY_SETTING: SettingsType = {  # pylint: disable=invalid-name\n            Updater.FONT_FAMILY_LABEL: (available_font_families(), QFont().family()),\n        }\n\n        self.FONT_SETTING: SettingsType = {  # pylint: disable=invalid-name\n            Updater.SIZE_LABEL: (range(4, 50), QFont().pointSize()),\n            Updater.IS_ITALIC_LABEL: (None, False)\n        }\n\n        self.label_font = QFont()\n        self.legend_settings = {}\n\n        self._setters = {\n            self.LABELS_BOX: {\n                self.FONT_FAMILY_LABEL: update_font_family,\n                self.TITLE_LABEL: update_title,\n                self.LABEL_LABEL: update_label,\n                self.AXIS_TITLE_LABEL: update_axes_titles,\n                self.AXIS_TICKS_LABEL: update_axes_ticks,\n                self.LEGEND_LABEL: update_legend,\n            },\n            self.ANNOT_BOX: {\n                self.TITLE_LABEL: update_title_text,\n                self.X_AXIS_LABEL: lambda **kw: update_axis(\"bottom\", **kw),\n                self.Y_AXIS_LABEL: lambda **kw: update_axis(\"left\", **kw),\n            }\n        }\n\n        self.initial_settings: Dict[str, Dict[str, SettingsType]] = NotImplemented\n\n        self.update_setters()\n        self._check_setters()\n\n    def update_setters(self):\n        pass\n\n    def _check_setters(self):\n        # false positive, pylint: disable=not-an-iterable\n        assert all(key in self._setters for key in self.initial_settings)\n        for k, inner in self.initial_settings.items():\n            assert all(key in self._setters[k] for key in inner)\n\n    def set_parameter(self, key: KeyType, value: ValueType):\n        self._setters[key[0]][key[1]](**{key[2]: value})\n",
            "new_file_content": "import sys\nfrom typing import Tuple, List, Dict, Iterable\n\nfrom AnyQt.QtCore import Qt\nfrom AnyQt.QtWidgets import QApplication\nfrom AnyQt.QtGui import QFont, QFontDatabase\n\nimport pyqtgraph as pg\nfrom pyqtgraph.graphicsItems.LegendItem import ItemSample\n\nfrom orangewidget.utils.visual_settings_dlg import KeyType, ValueType, \\\n    SettingsType, FontList\n\n_SettingType = Dict[str, ValueType]\n_LegendItemType = Tuple[ItemSample, pg.LabelItem]\n\n\ndef available_font_families() -> List:\n    \"\"\"\n    Function returns list of available font families.\n    Can be used to instantiate font combo boxes.\n\n    Returns\n    -------\n    fonts: list\n        List of available font families.\n    \"\"\"\n    if not QApplication.instance():\n        _ = QApplication(sys.argv)\n    fonts = QFontDatabase().families()\n    default = default_font_family()\n\n    defaults = [default]\n    if default in fonts:\n        fonts.remove(default)\n\n    guessed_name = default.split()[0]\n    i = 0\n    while i < len(fonts):\n        if fonts[i].startswith(guessed_name):\n            defaults.append(fonts.pop(i))\n        else:\n            i += 1\n    return FontList(defaults\n                    + [\"\"]\n                    + sorted(fonts, key=lambda s: s.replace(\".\", \"\")))\n\n\ndef default_font_family() -> str:\n    \"\"\"\n    Function returns default font family used in Qt application.\n    Can be used to instantiate initial dialog state.\n\n    Returns\n    -------\n    font: str\n        Default font family.\n    \"\"\"\n    if not QApplication.instance():\n        _ = QApplication(sys.argv)\n    return QFont().family()\n\n\ndef default_font_size() -> int:\n    \"\"\"\n    Function returns default font size in points used in Qt application.\n    Can be used to instantiate initial dialog state.\n\n    Returns\n    -------\n    size: int\n        Default font size in points.\n    \"\"\"\n    if not QApplication.instance():\n        _ = QApplication(sys.argv)\n    return QFont().pointSize()\n\n\nclass Updater:\n    \"\"\" Class with helper functions and constants. \"\"\"\n    FONT_FAMILY_LABEL, SIZE_LABEL, IS_ITALIC_LABEL = \\\n        \"Font family\", \"Font size\", \"Italic\"\n\n    WIDTH_LABEL, ALPHA_LABEL, STYLE_LABEL, ANTIALIAS_LABEL = \\\n        \"Width\", \"Opacity\", \"Style\", \"Antialias\"\n    LINE_STYLES = {\"Solid line\": Qt.SolidLine,\n                   \"Dash line\": Qt.DashLine,\n                   \"Dot line\": Qt.DotLine,\n                   \"Dash dot line\": Qt.DashDotLine,\n                   \"Dash dot dot line\": Qt.DashDotDotLine}\n    DEFAULT_LINE_STYLE = \"Solid line\"\n\n    @staticmethod\n    def update_plot_title_text(title_item: pg.LabelItem, text: str):\n        title_item.text = text\n        title_item.setVisible(bool(text))\n        title_item.item.setPlainText(text)\n        Updater.plot_title_resize(title_item)\n\n    @staticmethod\n    def update_plot_title_font(title_item: pg.LabelItem,\n                               **settings: _SettingType):\n        font = Updater.change_font(title_item.item.font(), settings)\n        title_item.item.setFont(font)\n        title_item.item.setPlainText(title_item.text)\n        Updater.plot_title_resize(title_item)\n\n    @staticmethod\n    def plot_title_resize(title_item):\n        height = title_item.item.boundingRect().height() + 6 \\\n            if title_item.text else 0\n        title_item.setMaximumHeight(height)\n        title_item.parentItem().layout.setRowFixedHeight(0, height)\n        title_item.resizeEvent(None)\n\n    @staticmethod\n    def update_axis_title_text(item: pg.AxisItem, text: str):\n        item.setLabel(text)\n        item.resizeEvent(None)\n\n    @staticmethod\n    def update_axes_titles_font(items: List[pg.AxisItem],\n                                **settings: _SettingType):\n        for item in items:\n            font = Updater.change_font(item.label.font(), settings)\n            item.label.setFont(font)\n            fstyle = [\"normal\", \"italic\"][font.italic()]\n            style = {\"font-size\": f\"{font.pointSize()}pt\",\n                     \"font-family\": f\"{font.family()}\",\n                     \"font-style\": f\"{fstyle}\"}\n            item.setLabel(None, None, None, **style)\n\n    @staticmethod\n    def update_axes_ticks_font(items: List[pg.AxisItem],\n                               **settings: _SettingType):\n        for item in items:\n            font = item.style[\"tickFont\"] or QFont()\n            # remove when contained in setTickFont() - version 0.11.0\n            item.style['tickFont'] = font\n            item.setTickFont(Updater.change_font(font, settings))\n\n    @staticmethod\n    def update_legend_font(items: Iterable[_LegendItemType],\n                           **settings: _SettingType):\n        for sample, label in items:\n            sample.setFixedHeight(sample.height())\n            sample.setFixedWidth(sample.width())\n            label.item.setFont(Updater.change_font(label.item.font(), settings))\n            bounds = label.itemRect()\n            label.setMaximumWidth(bounds.width())\n            label.setMaximumHeight(bounds.height())\n            label.updateMin()\n            label.resizeEvent(None)\n            label.updateGeometry()\n\n    @staticmethod\n    def update_num_legend_font(legend: pg.LegendItem,\n                               **settings: _SettingType):\n        if not legend:\n            return\n        for sample, _ in legend.items:\n            sample.set_font(Updater.change_font(sample.font, settings))\n            legend.setGeometry(sample.boundingRect())\n\n    @staticmethod\n    def update_label_font(items: List[pg.TextItem], font: QFont):\n        for item in items:\n            item.setFont(font)\n\n    @staticmethod\n    def change_font(font: QFont, settings: _SettingType) -> QFont:\n        assert all(s in (Updater.FONT_FAMILY_LABEL, Updater.SIZE_LABEL,\n                         Updater.IS_ITALIC_LABEL) for s in settings), settings\n\n        family = settings.get(Updater.FONT_FAMILY_LABEL)\n        if family is not None:\n            font.setFamily(family)\n        size = settings.get(Updater.SIZE_LABEL)\n        if size is not None:\n            font.setPointSize(size)\n        italic = settings.get(Updater.IS_ITALIC_LABEL)\n        if italic is not None:\n            font.setItalic(italic)\n        return font\n\n    @staticmethod\n    def update_lines(items: List[pg.PlotCurveItem], **settings: _SettingType):\n        for item in items:\n            antialias = settings.get(Updater.ANTIALIAS_LABEL)\n            if antialias is not None:\n                item.setData(item.xData, item.yData, antialias=antialias)\n\n            pen = item.opts[\"pen\"]\n            alpha = settings.get(Updater.ALPHA_LABEL)\n            if alpha is not None:\n                color = pen.color()\n                color.setAlpha(alpha)\n                pen.setColor(color)\n\n            style = settings.get(Updater.STYLE_LABEL)\n            if style is not None:\n                pen.setStyle(Updater.LINE_STYLES[style])\n\n            width = settings.get(Updater.WIDTH_LABEL)\n            if width is not None:\n                pen.setWidth(width)\n\n            item.setPen(pen)\n\n\nclass CommonParameterSetter:\n    \"\"\" Subclass to add 'setter' functionality to a plot. \"\"\"\n    LABELS_BOX = \"Fonts\"\n    ANNOT_BOX = \"Annotations\"\n    PLOT_BOX = \"Figure\"\n\n    FONT_FAMILY_LABEL = \"Font family\"\n    AXIS_TITLE_LABEL = \"Axis title\"\n    AXIS_TICKS_LABEL = \"Axis ticks\"\n    LEGEND_LABEL = \"Legend\"\n    LABEL_LABEL = \"Label\"\n    X_AXIS_LABEL = \"x-axis title\"\n    Y_AXIS_LABEL = \"y-axis title\"\n    TITLE_LABEL = \"Title\"\n\n    FONT_FAMILY_SETTING = None  # set in __init__ because it requires a running QApplication\n    FONT_SETTING = None  # set in __init__ because it requires a running QApplication\n    LINE_SETTING: SettingsType = {\n        Updater.WIDTH_LABEL: (range(1, 15), 1),\n        Updater.ALPHA_LABEL: (range(0, 255, 5), 255),\n        Updater.STYLE_LABEL: (list(Updater.LINE_STYLES), Updater.DEFAULT_LINE_STYLE),\n        Updater.ANTIALIAS_LABEL: (None, False),\n    }\n\n    def __init__(self):\n        def update_font_family(**settings):\n            # false positive, pylint: disable=unsubscriptable-object\n            for label in self.initial_settings[self.LABELS_BOX]:\n                if label != self.FONT_FAMILY_LABEL:\n                    setter = self._setters[self.LABELS_BOX][label]\n                    setter(**settings)\n\n        def update_title(**settings):\n            Updater.update_plot_title_font(self.title_item, **settings)\n\n        def update_label(**settings):\n            self.label_font = Updater.change_font(self.label_font, settings)\n            Updater.update_label_font(self.labels, self.label_font)\n\n        def update_axes_titles(**settings):\n            Updater.update_axes_titles_font(self.axis_items, **settings)\n\n        def update_axes_ticks(**settings):\n            Updater.update_axes_ticks_font(self.axis_items, **settings)\n\n        def update_legend(**settings):\n            self.legend_settings.update(**settings)\n            Updater.update_legend_font(self.legend_items, **settings)\n\n        def update_title_text(**settings):\n            Updater.update_plot_title_text(\n                self.title_item, settings[self.TITLE_LABEL])\n\n        def update_axis(axis, **settings):\n            Updater.update_axis_title_text(\n                self.getAxis(axis), settings[self.TITLE_LABEL])\n\n        self.FONT_FAMILY_SETTING: SettingsType = {  # pylint: disable=invalid-name\n            Updater.FONT_FAMILY_LABEL: (available_font_families(), default_font_family()),\n        }\n\n        self.FONT_SETTING: SettingsType = {  # pylint: disable=invalid-name\n            Updater.SIZE_LABEL: (range(4, 50), QFont().pointSize()),\n            Updater.IS_ITALIC_LABEL: (None, False)\n        }\n\n        self.label_font = QFont()\n        self.legend_settings = {}\n\n        self._setters = {\n            self.LABELS_BOX: {\n                self.FONT_FAMILY_LABEL: update_font_family,\n                self.TITLE_LABEL: update_title,\n                self.LABEL_LABEL: update_label,\n                self.AXIS_TITLE_LABEL: update_axes_titles,\n                self.AXIS_TICKS_LABEL: update_axes_ticks,\n                self.LEGEND_LABEL: update_legend,\n            },\n            self.ANNOT_BOX: {\n                self.TITLE_LABEL: update_title_text,\n                self.X_AXIS_LABEL: lambda **kw: update_axis(\"bottom\", **kw),\n                self.Y_AXIS_LABEL: lambda **kw: update_axis(\"left\", **kw),\n            }\n        }\n\n        self.initial_settings: Dict[str, Dict[str, SettingsType]] = NotImplemented\n\n        self.update_setters()\n        self._check_setters()\n\n    def update_setters(self):\n        pass\n\n    def _check_setters(self):\n        # false positive, pylint: disable=not-an-iterable\n        assert all(key in self._setters for key in self.initial_settings)\n        for k, inner in self.initial_settings.items():\n            assert all(key in self._setters[k] for key in inner)\n\n    def set_parameter(self, key: KeyType, value: ValueType):\n        self._setters[key[0]][key[1]](**{key[2]: value})\n",
            "header": {
                "file": {
                    "path": "Orange/widgets/visualize/utils/customizableplot.py"
                },
                "misc_line": null
            },
            "index_line": {
                "old_commit_hash": "afdc0ecfa",
                "new_commit_hash": "f9655a268",
                "mode": "100644"
            },
            "is_binary_file": false,
            "binary_line": null,
            "minus_file": {
                "path": "a/Orange/widgets/visualize/utils/customizableplot.py"
            },
            "plus_file": {
                "path": "b/Orange/widgets/visualize/utils/customizableplot.py"
            },
            "hunks": [
                {
                    "descriptor": {
                        "old_range": {
                            "start": 28,
                            "length": 8
                        },
                        "new_range": {
                            "start": 28,
                            "length": 11
                        },
                        "section": "def available_font_families() -> List:"
                    },
                    "line_group": {
                        "all_lines": [
                            {
                                "content": "    if not QApplication.instance():",
                                "type": "context"
                            },
                            {
                                "content": "        _ = QApplication(sys.argv)",
                                "type": "context"
                            },
                            {
                                "content": "    fonts = QFontDatabase().families()",
                                "type": "context"
                            },
                            {
                                "content": "    default = fonts.pop(fonts.index(default_font_family()))",
                                "type": "deleted"
                            },
                            {
                                "content": "    default = default_font_family()",
                                "type": "added"
                            },
                            {
                                "content": "",
                                "type": "added"
                            },
                            {
                                "content": "    defaults = [default]",
                                "type": "context"
                            },
                            {
                                "content": "    if default in fonts:",
                                "type": "added"
                            },
                            {
                                "content": "        fonts.remove(default)",
                                "type": "added"
                            },
                            {
                                "content": "",
                                "type": "context"
                            },
                            {
                                "content": "    guessed_name = default.split()[0]",
                                "type": "context"
                            },
                            {
                                "content": "    i = 0",
                                "type": "context"
                            }
                        ]
                    },
                    "modified_entities": [
                        {
                            "file_name": "Orange/widgets/visualize/utils/customizableplot.py",
                            "type": "function",
                            "name": "available_font_families",
                            "content": "def available_font_families() -> List:\n    \"\"\"\n    Function returns list of available font families.\n    Can be used to instantiate font combo boxes.\n\n    Returns\n    -------\n    fonts: list\n        List of available font families.\n    \"\"\"\n    if not QApplication.instance():\n        _ = QApplication(sys.argv)\n    fonts = QFontDatabase().families()\n    default = fonts.pop(fonts.index(default_font_family()))\n    defaults = [default]\n\n    guessed_name = default.split()[0]\n    i = 0\n    while i < len(fonts):\n        if fonts[i].startswith(guessed_name):\n            defaults.append(fonts.pop(i))\n        else:\n            i += 1\n    return FontList(defaults\n                    + [\"\"]\n                    + sorted(fonts, key=lambda s: s.replace(\".\", \"\")))",
                            "ast_type_str": "FunctionDef",
                            "start_lineno": 18,
                            "end_lineno": 43,
                            "parent": null
                        }
                    ],
                    "added_entities": [],
                    "deleted_entities": []
                },
                {
                    "descriptor": {
                        "old_range": {
                            "start": 263,
                            "length": 7
                        },
                        "new_range": {
                            "start": 266,
                            "length": 7
                        },
                        "section": "class CommonParameterSetter:"
                    },
                    "line_group": {
                        "all_lines": [
                            {
                                "content": "                self.getAxis(axis), settings[self.TITLE_LABEL])",
                                "type": "context"
                            },
                            {
                                "content": "",
                                "type": "context"
                            },
                            {
                                "content": "        self.FONT_FAMILY_SETTING: SettingsType = {  # pylint: disable=invalid-name",
                                "type": "context"
                            },
                            {
                                "content": "            Updater.FONT_FAMILY_LABEL: (available_font_families(), QFont().family()),",
                                "type": "deleted"
                            },
                            {
                                "content": "            Updater.FONT_FAMILY_LABEL: (available_font_families(), default_font_family()),",
                                "type": "added"
                            },
                            {
                                "content": "        }",
                                "type": "context"
                            },
                            {
                                "content": "",
                                "type": "context"
                            },
                            {
                                "content": "        self.FONT_SETTING: SettingsType = {  # pylint: disable=invalid-name",
                                "type": "context"
                            }
                        ]
                    },
                    "modified_entities": [
                        {
                            "file_name": "Orange/widgets/visualize/utils/customizableplot.py",
                            "type": "class",
                            "name": "CommonParameterSetter",
                            "content": "class CommonParameterSetter:\n    \"\"\" Subclass to add 'setter' functionality to a plot. \"\"\"\n    LABELS_BOX = \"Fonts\"\n    ANNOT_BOX = \"Annotations\"\n    PLOT_BOX = \"Figure\"\n\n    FONT_FAMILY_LABEL = \"Font family\"\n    AXIS_TITLE_LABEL = \"Axis title\"\n    AXIS_TICKS_LABEL = \"Axis ticks\"\n    LEGEND_LABEL = \"Legend\"\n    LABEL_LABEL = \"Label\"\n    X_AXIS_LABEL = \"x-axis title\"\n    Y_AXIS_LABEL = \"y-axis title\"\n    TITLE_LABEL = \"Title\"\n\n    FONT_FAMILY_SETTING = None  # set in __init__ because it requires a running QApplication\n    FONT_SETTING = None  # set in __init__ because it requires a running QApplication\n    LINE_SETTING: SettingsType = {\n        Updater.WIDTH_LABEL: (range(1, 15), 1),\n        Updater.ALPHA_LABEL: (range(0, 255, 5), 255),\n        Updater.STYLE_LABEL: (list(Updater.LINE_STYLES), Updater.DEFAULT_LINE_STYLE),\n        Updater.ANTIALIAS_LABEL: (None, False),\n    }\n\n    def __init__(self):\n        def update_font_family(**settings):\n            # false positive, pylint: disable=unsubscriptable-object\n            for label in self.initial_settings[self.LABELS_BOX]:\n                if label != self.FONT_FAMILY_LABEL:\n                    setter = self._setters[self.LABELS_BOX][label]\n                    setter(**settings)\n\n        def update_title(**settings):\n            Updater.update_plot_title_font(self.title_item, **settings)\n\n        def update_label(**settings):\n            self.label_font = Updater.change_font(self.label_font, settings)\n            Updater.update_label_font(self.labels, self.label_font)\n\n        def update_axes_titles(**settings):\n            Updater.update_axes_titles_font(self.axis_items, **settings)\n\n        def update_axes_ticks(**settings):\n            Updater.update_axes_ticks_font(self.axis_items, **settings)\n\n        def update_legend(**settings):\n            self.legend_settings.update(**settings)\n            Updater.update_legend_font(self.legend_items, **settings)\n\n        def update_title_text(**settings):\n            Updater.update_plot_title_text(\n                self.title_item, settings[self.TITLE_LABEL])\n\n        def update_axis(axis, **settings):\n            Updater.update_axis_title_text(\n                self.getAxis(axis), settings[self.TITLE_LABEL])\n\n        self.FONT_FAMILY_SETTING: SettingsType = {  # pylint: disable=invalid-name\n            Updater.FONT_FAMILY_LABEL: (available_font_families(), QFont().family()),\n        }\n\n        self.FONT_SETTING: SettingsType = {  # pylint: disable=invalid-name\n            Updater.SIZE_LABEL: (range(4, 50), QFont().pointSize()),\n            Updater.IS_ITALIC_LABEL: (None, False)\n        }\n\n        self.label_font = QFont()\n        self.legend_settings = {}\n\n        self._setters = {\n            self.LABELS_BOX: {\n                self.FONT_FAMILY_LABEL: update_font_family,\n                self.TITLE_LABEL: update_title,\n                self.LABEL_LABEL: update_label,\n                self.AXIS_TITLE_LABEL: update_axes_titles,\n                self.AXIS_TICKS_LABEL: update_axes_ticks,\n                self.LEGEND_LABEL: update_legend,\n            },\n            self.ANNOT_BOX: {\n                self.TITLE_LABEL: update_title_text,\n                self.X_AXIS_LABEL: lambda **kw: update_axis(\"bottom\", **kw),\n                self.Y_AXIS_LABEL: lambda **kw: update_axis(\"left\", **kw),\n            }\n        }\n\n        self.initial_settings: Dict[str, Dict[str, SettingsType]] = NotImplemented\n\n        self.update_setters()\n        self._check_setters()\n\n    def update_setters(self):\n        pass\n\n    def _check_setters(self):\n        # false positive, pylint: disable=not-an-iterable\n        assert all(key in self._setters for key in self.initial_settings)\n        for k, inner in self.initial_settings.items():\n            assert all(key in self._setters[k] for key in inner)\n\n    def set_parameter(self, key: KeyType, value: ValueType):\n        self._setters[key[0]][key[1]](**{key[2]: value})",
                            "ast_type_str": "ClassDef",
                            "start_lineno": 208,
                            "end_lineno": 308,
                            "parent": null
                        },
                        {
                            "file_name": "Orange/widgets/visualize/utils/customizableplot.py",
                            "type": "method",
                            "name": "CommonParameterSetter.__init__",
                            "content": "class CommonParameterSetter:\n    \"\"\" Subclass to add 'setter' functionality to a plot. \"\"\"\n    LABELS_BOX = \"Fonts\"\n    ANNOT_BOX = \"Annotations\"\n    PLOT_BOX = \"Figure\"\n\n    FONT_FAMILY_LABEL = \"Font family\"\n    AXIS_TITLE_LABEL = \"Axis title\"\n    AXIS_TICKS_LABEL = \"Axis ticks\"\n    LEGEND_LABEL = \"Legend\"\n    LABEL_LABEL = \"Label\"\n    X_AXIS_LABEL = \"x-axis title\"\n    Y_AXIS_LABEL = \"y-axis title\"\n    TITLE_LABEL = \"Title\"\n\n    FONT_FAMILY_SETTING = None  # set in __init__ because it requires a running QApplication\n    FONT_SETTING = None  # set in __init__ because it requires a running QApplication\n    LINE_SETTING: SettingsType = {\n        Updater.WIDTH_LABEL: (range(1, 15), 1),\n        Updater.ALPHA_LABEL: (range(0, 255, 5), 255),\n        Updater.STYLE_LABEL: (list(Updater.LINE_STYLES), Updater.DEFAULT_LINE_STYLE),\n        Updater.ANTIALIAS_LABEL: (None, False),\n    }\n\n    def __init__(self):\n        def update_font_family(**settings):\n            # false positive, pylint: disable=unsubscriptable-object\n            for label in self.initial_settings[self.LABELS_BOX]:\n                if label != self.FONT_FAMILY_LABEL:\n                    setter = self._setters[self.LABELS_BOX][label]\n                    setter(**settings)\n\n        def update_title(**settings):\n            Updater.update_plot_title_font(self.title_item, **settings)\n\n        def update_label(**settings):\n            self.label_font = Updater.change_font(self.label_font, settings)\n            Updater.update_label_font(self.labels, self.label_font)\n\n        def update_axes_titles(**settings):\n            Updater.update_axes_titles_font(self.axis_items, **settings)\n\n        def update_axes_ticks(**settings):\n            Updater.update_axes_ticks_font(self.axis_items, **settings)\n\n        def update_legend(**settings):\n            self.legend_settings.update(**settings)\n            Updater.update_legend_font(self.legend_items, **settings)\n\n        def update_title_text(**settings):\n            Updater.update_plot_title_text(\n                self.title_item, settings[self.TITLE_LABEL])\n\n        def update_axis(axis, **settings):\n            Updater.update_axis_title_text(\n                self.getAxis(axis), settings[self.TITLE_LABEL])\n\n        self.FONT_FAMILY_SETTING: SettingsType = {  # pylint: disable=invalid-name\n            Updater.FONT_FAMILY_LABEL: (available_font_families(), QFont().family()),\n        }\n\n        self.FONT_SETTING: SettingsType = {  # pylint: disable=invalid-name\n            Updater.SIZE_LABEL: (range(4, 50), QFont().pointSize()),\n            Updater.IS_ITALIC_LABEL: (None, False)\n        }\n\n        self.label_font = QFont()\n        self.legend_settings = {}\n\n        self._setters = {\n            self.LABELS_BOX: {\n                self.FONT_FAMILY_LABEL: update_font_family,\n                self.TITLE_LABEL: update_title,\n                self.LABEL_LABEL: update_label,\n                self.AXIS_TITLE_LABEL: update_axes_titles,\n                self.AXIS_TICKS_LABEL: update_axes_ticks,\n                self.LEGEND_LABEL: update_legend,\n            },\n            self.ANNOT_BOX: {\n                self.TITLE_LABEL: update_title_text,\n                self.X_AXIS_LABEL: lambda **kw: update_axis(\"bottom\", **kw),\n                self.Y_AXIS_LABEL: lambda **kw: update_axis(\"left\", **kw),\n            }\n        }\n\n        self.initial_settings: Dict[str, Dict[str, SettingsType]] = NotImplemented\n\n        self.update_setters()\n        self._check_setters()\n\n    def update_setters(self):\n        pass\n\n    def _check_setters(self):\n        # false positive, pylint: disable=not-an-iterable\n        assert all(key in self._setters for key in self.initial_settings)\n        for k, inner in self.initial_settings.items():\n            assert all(key in self._setters[k] for key in inner)\n\n    def set_parameter(self, key: KeyType, value: ValueType):\n        self._setters[key[0]][key[1]](**{key[2]: value})",
                            "ast_type_str": "ClassDef",
                            "start_lineno": 232,
                            "end_lineno": 296,
                            "parent": {
                                "file_name": "Orange/widgets/visualize/utils/customizableplot.py",
                                "type": "class",
                                "name": "CommonParameterSetter",
                                "content": "class CommonParameterSetter:\n    \"\"\" Subclass to add 'setter' functionality to a plot. \"\"\"\n    LABELS_BOX = \"Fonts\"\n    ANNOT_BOX = \"Annotations\"\n    PLOT_BOX = \"Figure\"\n\n    FONT_FAMILY_LABEL = \"Font family\"\n    AXIS_TITLE_LABEL = \"Axis title\"\n    AXIS_TICKS_LABEL = \"Axis ticks\"\n    LEGEND_LABEL = \"Legend\"\n    LABEL_LABEL = \"Label\"\n    X_AXIS_LABEL = \"x-axis title\"\n    Y_AXIS_LABEL = \"y-axis title\"\n    TITLE_LABEL = \"Title\"\n\n    FONT_FAMILY_SETTING = None  # set in __init__ because it requires a running QApplication\n    FONT_SETTING = None  # set in __init__ because it requires a running QApplication\n    LINE_SETTING: SettingsType = {\n        Updater.WIDTH_LABEL: (range(1, 15), 1),\n        Updater.ALPHA_LABEL: (range(0, 255, 5), 255),\n        Updater.STYLE_LABEL: (list(Updater.LINE_STYLES), Updater.DEFAULT_LINE_STYLE),\n        Updater.ANTIALIAS_LABEL: (None, False),\n    }\n\n    def __init__(self):\n        def update_font_family(**settings):\n            # false positive, pylint: disable=unsubscriptable-object\n            for label in self.initial_settings[self.LABELS_BOX]:\n                if label != self.FONT_FAMILY_LABEL:\n                    setter = self._setters[self.LABELS_BOX][label]\n                    setter(**settings)\n\n        def update_title(**settings):\n            Updater.update_plot_title_font(self.title_item, **settings)\n\n        def update_label(**settings):\n            self.label_font = Updater.change_font(self.label_font, settings)\n            Updater.update_label_font(self.labels, self.label_font)\n\n        def update_axes_titles(**settings):\n            Updater.update_axes_titles_font(self.axis_items, **settings)\n\n        def update_axes_ticks(**settings):\n            Updater.update_axes_ticks_font(self.axis_items, **settings)\n\n        def update_legend(**settings):\n            self.legend_settings.update(**settings)\n            Updater.update_legend_font(self.legend_items, **settings)\n\n        def update_title_text(**settings):\n            Updater.update_plot_title_text(\n                self.title_item, settings[self.TITLE_LABEL])\n\n        def update_axis(axis, **settings):\n            Updater.update_axis_title_text(\n                self.getAxis(axis), settings[self.TITLE_LABEL])\n\n        self.FONT_FAMILY_SETTING: SettingsType = {  # pylint: disable=invalid-name\n            Updater.FONT_FAMILY_LABEL: (available_font_families(), QFont().family()),\n        }\n\n        self.FONT_SETTING: SettingsType = {  # pylint: disable=invalid-name\n            Updater.SIZE_LABEL: (range(4, 50), QFont().pointSize()),\n            Updater.IS_ITALIC_LABEL: (None, False)\n        }\n\n        self.label_font = QFont()\n        self.legend_settings = {}\n\n        self._setters = {\n            self.LABELS_BOX: {\n                self.FONT_FAMILY_LABEL: update_font_family,\n                self.TITLE_LABEL: update_title,\n                self.LABEL_LABEL: update_label,\n                self.AXIS_TITLE_LABEL: update_axes_titles,\n                self.AXIS_TICKS_LABEL: update_axes_ticks,\n                self.LEGEND_LABEL: update_legend,\n            },\n            self.ANNOT_BOX: {\n                self.TITLE_LABEL: update_title_text,\n                self.X_AXIS_LABEL: lambda **kw: update_axis(\"bottom\", **kw),\n                self.Y_AXIS_LABEL: lambda **kw: update_axis(\"left\", **kw),\n            }\n        }\n\n        self.initial_settings: Dict[str, Dict[str, SettingsType]] = NotImplemented\n\n        self.update_setters()\n        self._check_setters()\n\n    def update_setters(self):\n        pass\n\n    def _check_setters(self):\n        # false positive, pylint: disable=not-an-iterable\n        assert all(key in self._setters for key in self.initial_settings)\n        for k, inner in self.initial_settings.items():\n            assert all(key in self._setters[k] for key in inner)\n\n    def set_parameter(self, key: KeyType, value: ValueType):\n        self._setters[key[0]][key[1]](**{key[2]: value})",
                                "ast_type_str": "ClassDef",
                                "start_lineno": 208,
                                "end_lineno": 308,
                                "parent": null
                            }
                        }
                    ],
                    "added_entities": [],
                    "deleted_entities": []
                }
            ]
        },
        {
            "old_file_content": "",
            "new_file_content": "import unittest\nfrom unittest.mock import patch, Mock\n\nfrom Orange.widgets.visualize.utils import customizableplot\n\n\nclass TestFonts(unittest.TestCase):\n    def test_available_font_families(self):\n        with patch.object(customizableplot, \"QFont\") as font, \\\n                patch.object(customizableplot, \"QFontDatabase\") as db:\n            font.return_value = Mock()\n            font.return_value.family = Mock(return_value=\"mock regular\")\n\n            db.return_value = Mock()\n            db.return_value.families = Mock(\n                return_value=[\"a\", \".d\", \"e\", \".b\", \"mock regular\", \"c\"])\n            self.assertEqual(customizableplot.available_font_families(),\n                             [\"mock regular\", \"\", \"a\", \".b\", \"c\", \".d\", \"e\"])\n\n            db.return_value = Mock()\n            db.return_value.families = Mock(\n                return_value=[\"a\", \".d\", \"e\", \".b\", \"mock regular\",\n                              \"mock bold\", \"mock italic\", \"c\", \"mock semi\"])\n            self.assertEqual(customizableplot.available_font_families(),\n                             [\"mock regular\", \"mock bold\", \"mock italic\",\n                              \"mock semi\", \"\",\n                              \"a\", \".b\", \"c\", \".d\", \"e\"])\n\n            # It seems it's possible that default font family does not exist\n            # (see gh-5036)\n            db.return_value.families.return_value = [\"a\", \".d\", \"e\", \".b\", \"c\"]\n            self.assertEqual(customizableplot.available_font_families(),\n                             [\"mock regular\", \"\", \"a\", \".b\", \"c\", \".d\", \"e\"])\n            self.assertIn(customizableplot.default_font_family(),\n                          customizableplot.available_font_families())\n\nif __name__ == \"__main__\":\n    unittest.main()\n",
            "header": {
                "file": {
                    "path": "Orange/widgets/visualize/utils/tests/test_customizableplot.py"
                },
                "misc_line": "new file mode 100644"
            },
            "index_line": {
                "old_commit_hash": "000000000",
                "new_commit_hash": "5863ced5f",
                "mode": ""
            },
            "is_binary_file": false,
            "binary_line": null,
            "minus_file": {
                "path": "/dev/null"
            },
            "plus_file": {
                "path": "b/Orange/widgets/visualize/utils/tests/test_customizableplot.py"
            },
            "hunks": [
                {
                    "descriptor": {
                        "old_range": {
                            "start": 0,
                            "length": 0
                        },
                        "new_range": {
                            "start": 1,
                            "length": 38
                        },
                        "section": ""
                    },
                    "line_group": {
                        "all_lines": [
                            {
                                "content": "import unittest",
                                "type": "added"
                            },
                            {
                                "content": "from unittest.mock import patch, Mock",
                                "type": "added"
                            },
                            {
                                "content": "",
                                "type": "added"
                            },
                            {
                                "content": "from Orange.widgets.visualize.utils import customizableplot",
                                "type": "added"
                            },
                            {
                                "content": "",
                                "type": "added"
                            },
                            {
                                "content": "",
                                "type": "added"
                            },
                            {
                                "content": "class TestFonts(unittest.TestCase):",
                                "type": "added"
                            },
                            {
                                "content": "    def test_available_font_families(self):",
                                "type": "added"
                            },
                            {
                                "content": "        with patch.object(customizableplot, \"QFont\") as font, \\",
                                "type": "added"
                            },
                            {
                                "content": "                patch.object(customizableplot, \"QFontDatabase\") as db:",
                                "type": "added"
                            },
                            {
                                "content": "            font.return_value = Mock()",
                                "type": "added"
                            },
                            {
                                "content": "            font.return_value.family = Mock(return_value=\"mock regular\")",
                                "type": "added"
                            },
                            {
                                "content": "",
                                "type": "added"
                            },
                            {
                                "content": "            db.return_value = Mock()",
                                "type": "added"
                            },
                            {
                                "content": "            db.return_value.families = Mock(",
                                "type": "added"
                            },
                            {
                                "content": "                return_value=[\"a\", \".d\", \"e\", \".b\", \"mock regular\", \"c\"])",
                                "type": "added"
                            },
                            {
                                "content": "            self.assertEqual(customizableplot.available_font_families(),",
                                "type": "added"
                            },
                            {
                                "content": "                             [\"mock regular\", \"\", \"a\", \".b\", \"c\", \".d\", \"e\"])",
                                "type": "added"
                            },
                            {
                                "content": "",
                                "type": "added"
                            },
                            {
                                "content": "            db.return_value = Mock()",
                                "type": "added"
                            },
                            {
                                "content": "            db.return_value.families = Mock(",
                                "type": "added"
                            },
                            {
                                "content": "                return_value=[\"a\", \".d\", \"e\", \".b\", \"mock regular\",",
                                "type": "added"
                            },
                            {
                                "content": "                              \"mock bold\", \"mock italic\", \"c\", \"mock semi\"])",
                                "type": "added"
                            },
                            {
                                "content": "            self.assertEqual(customizableplot.available_font_families(),",
                                "type": "added"
                            },
                            {
                                "content": "                             [\"mock regular\", \"mock bold\", \"mock italic\",",
                                "type": "added"
                            },
                            {
                                "content": "                              \"mock semi\", \"\",",
                                "type": "added"
                            },
                            {
                                "content": "                              \"a\", \".b\", \"c\", \".d\", \"e\"])",
                                "type": "added"
                            },
                            {
                                "content": "",
                                "type": "added"
                            },
                            {
                                "content": "            # It seems it's possible that default font family does not exist",
                                "type": "added"
                            },
                            {
                                "content": "            # (see gh-5036)",
                                "type": "added"
                            },
                            {
                                "content": "            db.return_value.families.return_value = [\"a\", \".d\", \"e\", \".b\", \"c\"]",
                                "type": "added"
                            },
                            {
                                "content": "            self.assertEqual(customizableplot.available_font_families(),",
                                "type": "added"
                            },
                            {
                                "content": "                             [\"mock regular\", \"\", \"a\", \".b\", \"c\", \".d\", \"e\"])",
                                "type": "added"
                            },
                            {
                                "content": "            self.assertIn(customizableplot.default_font_family(),",
                                "type": "added"
                            },
                            {
                                "content": "                          customizableplot.available_font_families())",
                                "type": "added"
                            },
                            {
                                "content": "",
                                "type": "added"
                            },
                            {
                                "content": "if __name__ == \"__main__\":",
                                "type": "added"
                            },
                            {
                                "content": "    unittest.main()",
                                "type": "added"
                            },
                            {
                                "content": "",
                                "type": "context"
                            }
                        ]
                    },
                    "modified_entities": [],
                    "added_entities": [
                        {
                            "file_name": "Orange/widgets/visualize/utils/tests/test_customizableplot.py",
                            "type": "import",
                            "name": "unittest",
                            "content": "import unittest",
                            "ast_type_str": "Import",
                            "start_lineno": 1,
                            "end_lineno": 1,
                            "parent": null
                        },
                        {
                            "file_name": "Orange/widgets/visualize/utils/tests/test_customizableplot.py",
                            "type": "statement",
                            "name": "",
                            "content": "from Orange.widgets.visualize.utils import customizableplot",
                            "ast_type_str": "ImportFrom",
                            "start_lineno": 4,
                            "end_lineno": 4,
                            "parent": null
                        },
                        {
                            "file_name": "Orange/widgets/visualize/utils/tests/test_customizableplot.py",
                            "type": "method",
                            "name": "TestFonts.test_available_font_families",
                            "content": "class TestFonts(unittest.TestCase):\n    def test_available_font_families(self):\n        with patch.object(customizableplot, \"QFont\") as font, \\\n                patch.object(customizableplot, \"QFontDatabase\") as db:\n            font.return_value = Mock()\n            font.return_value.family = Mock(return_value=\"mock regular\")\n\n            db.return_value = Mock()\n            db.return_value.families = Mock(\n                return_value=[\"a\", \".d\", \"e\", \".b\", \"mock regular\", \"c\"])\n            self.assertEqual(customizableplot.available_font_families(),\n                             [\"mock regular\", \"\", \"a\", \".b\", \"c\", \".d\", \"e\"])\n\n            db.return_value = Mock()\n            db.return_value.families = Mock(\n                return_value=[\"a\", \".d\", \"e\", \".b\", \"mock regular\",\n                              \"mock bold\", \"mock italic\", \"c\", \"mock semi\"])\n            self.assertEqual(customizableplot.available_font_families(),\n                             [\"mock regular\", \"mock bold\", \"mock italic\",\n                              \"mock semi\", \"\",\n                              \"a\", \".b\", \"c\", \".d\", \"e\"])\n\n            # It seems it's possible that default font family does not exist\n            # (see gh-5036)\n            db.return_value.families.return_value = [\"a\", \".d\", \"e\", \".b\", \"c\"]\n            self.assertEqual(customizableplot.available_font_families(),\n                             [\"mock regular\", \"\", \"a\", \".b\", \"c\", \".d\", \"e\"])\n            self.assertIn(customizableplot.default_font_family(),\n                          customizableplot.available_font_families())",
                            "ast_type_str": "ClassDef",
                            "start_lineno": 8,
                            "end_lineno": 35,
                            "parent": {
                                "file_name": "Orange/widgets/visualize/utils/tests/test_customizableplot.py",
                                "type": "class",
                                "name": "TestFonts",
                                "content": "class TestFonts(unittest.TestCase):\n    def test_available_font_families(self):\n        with patch.object(customizableplot, \"QFont\") as font, \\\n                patch.object(customizableplot, \"QFontDatabase\") as db:\n            font.return_value = Mock()\n            font.return_value.family = Mock(return_value=\"mock regular\")\n\n            db.return_value = Mock()\n            db.return_value.families = Mock(\n                return_value=[\"a\", \".d\", \"e\", \".b\", \"mock regular\", \"c\"])\n            self.assertEqual(customizableplot.available_font_families(),\n                             [\"mock regular\", \"\", \"a\", \".b\", \"c\", \".d\", \"e\"])\n\n            db.return_value = Mock()\n            db.return_value.families = Mock(\n                return_value=[\"a\", \".d\", \"e\", \".b\", \"mock regular\",\n                              \"mock bold\", \"mock italic\", \"c\", \"mock semi\"])\n            self.assertEqual(customizableplot.available_font_families(),\n                             [\"mock regular\", \"mock bold\", \"mock italic\",\n                              \"mock semi\", \"\",\n                              \"a\", \".b\", \"c\", \".d\", \"e\"])\n\n            # It seems it's possible that default font family does not exist\n            # (see gh-5036)\n            db.return_value.families.return_value = [\"a\", \".d\", \"e\", \".b\", \"c\"]\n            self.assertEqual(customizableplot.available_font_families(),\n                             [\"mock regular\", \"\", \"a\", \".b\", \"c\", \".d\", \"e\"])\n            self.assertIn(customizableplot.default_font_family(),\n                          customizableplot.available_font_families())",
                                "ast_type_str": "ClassDef",
                                "start_lineno": 7,
                                "end_lineno": 35,
                                "parent": null
                            }
                        },
                        {
                            "file_name": "Orange/widgets/visualize/utils/tests/test_customizableplot.py",
                            "type": "statement",
                            "name": "",
                            "content": "from unittest.mock import patch, Mock",
                            "ast_type_str": "ImportFrom",
                            "start_lineno": 2,
                            "end_lineno": 2,
                            "parent": null
                        },
                        {
                            "file_name": "Orange/widgets/visualize/utils/tests/test_customizableplot.py",
                            "type": "statement",
                            "name": "",
                            "content": "if __name__ == \"__main__\":\n    unittest.main()",
                            "ast_type_str": "If",
                            "start_lineno": 37,
                            "end_lineno": 38,
                            "parent": null
                        },
                        {
                            "file_name": "Orange/widgets/visualize/utils/tests/test_customizableplot.py",
                            "type": "class",
                            "name": "TestFonts",
                            "content": "class TestFonts(unittest.TestCase):\n    def test_available_font_families(self):\n        with patch.object(customizableplot, \"QFont\") as font, \\\n                patch.object(customizableplot, \"QFontDatabase\") as db:\n            font.return_value = Mock()\n            font.return_value.family = Mock(return_value=\"mock regular\")\n\n            db.return_value = Mock()\n            db.return_value.families = Mock(\n                return_value=[\"a\", \".d\", \"e\", \".b\", \"mock regular\", \"c\"])\n            self.assertEqual(customizableplot.available_font_families(),\n                             [\"mock regular\", \"\", \"a\", \".b\", \"c\", \".d\", \"e\"])\n\n            db.return_value = Mock()\n            db.return_value.families = Mock(\n                return_value=[\"a\", \".d\", \"e\", \".b\", \"mock regular\",\n                              \"mock bold\", \"mock italic\", \"c\", \"mock semi\"])\n            self.assertEqual(customizableplot.available_font_families(),\n                             [\"mock regular\", \"mock bold\", \"mock italic\",\n                              \"mock semi\", \"\",\n                              \"a\", \".b\", \"c\", \".d\", \"e\"])\n\n            # It seems it's possible that default font family does not exist\n            # (see gh-5036)\n            db.return_value.families.return_value = [\"a\", \".d\", \"e\", \".b\", \"c\"]\n            self.assertEqual(customizableplot.available_font_families(),\n                             [\"mock regular\", \"\", \"a\", \".b\", \"c\", \".d\", \"e\"])\n            self.assertIn(customizableplot.default_font_family(),\n                          customizableplot.available_font_families())",
                            "ast_type_str": "ClassDef",
                            "start_lineno": 7,
                            "end_lineno": 35,
                            "parent": null
                        }
                    ],
                    "deleted_entities": []
                }
            ]
        }
    ],
    "old_commit_hash": "1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f^",
    "new_commit_hash": "1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f",
    "commit_message": "customizableplot.available_font_families: Fix for non-existent default family",
    "commit_date": "2020-10-23T16:40:19+02:00",
    "metadata": {}
}
{
    "repo_name": "orange3",
    "new_commit_hash": "1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f",
    "test_file_codes": [
        "import unittest\nfrom unittest.mock import patch, Mock\n\nfrom Orange.widgets.visualize.utils import customizableplot\n\n\nclass TestFonts(unittest.TestCase):\n    def test_available_font_families(self):\n        with patch.object(customizableplot, \"QFont\") as font, \\\n                patch.object(customizableplot, \"QFontDatabase\") as db:\n            font.return_value = Mock()\n            font.return_value.family = Mock(return_value=\"mock regular\")\n\n            db.return_value = Mock()\n            db.return_value.families = Mock(\n                return_value=[\"a\", \".d\", \"e\", \".b\", \"mock regular\", \"c\"])\n            self.assertEqual(customizableplot.available_font_families(),\n                             [\"mock regular\", \"\", \"a\", \".b\", \"c\", \".d\", \"e\"])\n\n            db.return_value = Mock()\n            db.return_value.families = Mock(\n                return_value=[\"a\", \".d\", \"e\", \".b\", \"mock regular\",\n                              \"mock bold\", \"mock italic\", \"c\", \"mock semi\"])\n            self.assertEqual(customizableplot.available_font_families(),\n                             [\"mock regular\", \"mock bold\", \"mock italic\",\n                              \"mock semi\", \"\",\n                              \"a\", \".b\", \"c\", \".d\", \"e\"])\n\n            # It seems it's possible that default font family does not exist\n            # (see gh-5036)\n            db.return_value.families.return_value = [\"a\", \".d\", \"e\", \".b\", \"c\"]\n            self.assertEqual(customizableplot.available_font_families(),\n                             [\"mock regular\", \"\", \"a\", \".b\", \"c\", \".d\", \"e\"])\n            self.assertIn(customizableplot.default_font_family(),\n                          customizableplot.available_font_families())\n\nif __name__ == \"__main__\":\n    unittest.main()\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/tmp2umu30ls/tmp\ncreating /tmp/tmp2umu30ls/tmp/tmp2umu30ls\ncompile options: '-MMD -MF /tmp/tmp2umu30ls/file.c.d -c'\ncc: /tmp/tmp2umu30ls/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/tmp3ilrqmib/tmp\ncreating /tmp/tmp3ilrqmib/tmp/tmp3ilrqmib\ncompile options: '-MMD -MF /tmp/tmp3ilrqmib/file.c.d -c'\ncc: /tmp/tmp3ilrqmib/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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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/tmp5dimh1b1/tmp\ncreating /tmp/tmp5dimh1b1/tmp/tmp5dimh1b1\ncompile options: '-MMD -MF /tmp/tmp5dimh1b1/file.c.d -c'\ncc: /tmp/tmp5dimh1b1/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/tmpd9mlevp0/tmp\ncreating /tmp/tmpd9mlevp0/tmp/tmpd9mlevp0\ncompile options: '-MMD -MF /tmp/tmpd9mlevp0/file.c.d -c'\ncc: /tmp/tmpd9mlevp0/file.c\ncustomize UnixCCompiler using build_ext\nCreating /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.venv/lib/python3.7/site-packages/Orange3.egg-link (link to .)\nAdding Orange3 3.27.0 to easy-install.pth file\nInstalling orange-canvas script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.venv/bin\n\nInstalled /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f\nProcessing dependencies for Orange3==3.27.0\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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.venv/bin\nInstalling pip3 script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.venv/bin\nInstalling pip3.10 script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.venv/bin\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.venv/bin\nInstalling f2py3 script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.venv/bin\nInstalling f2py3.7 script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.venv/bin\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.venv/bin\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.venv/bin\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.venv/bin\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.venv/bin\nInstalling pyrcc5 script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.venv/bin\nInstalling pyuic5 script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.venv/bin\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.venv/bin\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.venv/bin\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.venv/bin\nInstalling pyftmerge script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.venv/bin\nInstalling pyftsubset script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.venv/bin\nInstalling ttx script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.venv/bin\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.venv/lib/python3.7/site-packages\nFinished processing dependencies for Orange3==3.27.0\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 73ms\nPrepared 18 packages in 15ms\nInstalled 18 packages in 613ms\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 299ms\nInstalled 47 packages in 742ms\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 58ms\nInstalled 13 packages in 68ms\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 18ms\nInstalled 2 packages in 66ms\n + psycopg2==2.9.9\n + pymssql==2.3.2\nAudited 1 package in 5ms\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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1830,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1830,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1830,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1830,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1830,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1830,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1830,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f/.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": 0,
    "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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f\ncollected 1 item\n\nr2e_tests/test_1.py .                                                    [100%]\n\n==================================== PASSES ====================================\n=========================== short test summary info ============================\nPASSED r2e_tests/test_1.py::TestFonts::test_available_font_families\n============================== 1 passed in 2.12s ===============================\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_1e559ec2b18ed6d11fa2e2bcf79f4b697b85ad2f\ncollected 1 item\n\nr2e_tests/test_1.py F                                                    [100%]\n\n=================================== FAILURES ===================================\n____________________ TestFonts.test_available_font_families ____________________\n\nself = <r2e_tests.test_1.TestFonts testMethod=test_available_font_families>\n\n    def test_available_font_families(self):\n        with patch.object(customizableplot, \"QFont\") as font, \\\n                patch.object(customizableplot, \"QFontDatabase\") as db:\n            font.return_value = Mock()\n            font.return_value.family = Mock(return_value=\"mock regular\")\n    \n            db.return_value = Mock()\n            db.return_value.families = Mock(\n                return_value=[\"a\", \".d\", \"e\", \".b\", \"mock regular\", \"c\"])\n            self.assertEqual(customizableplot.available_font_families(),\n                             [\"mock regular\", \"\", \"a\", \".b\", \"c\", \".d\", \"e\"])\n    \n            db.return_value = Mock()\n            db.return_value.families = Mock(\n                return_value=[\"a\", \".d\", \"e\", \".b\", \"mock regular\",\n                              \"mock bold\", \"mock italic\", \"c\", \"mock semi\"])\n            self.assertEqual(customizableplot.available_font_families(),\n                             [\"mock regular\", \"mock bold\", \"mock italic\",\n                              \"mock semi\", \"\",\n                              \"a\", \".b\", \"c\", \".d\", \"e\"])\n    \n            # It seems it's possible that default font family does not exist\n            # (see gh-5036)\n            db.return_value.families.return_value = [\"a\", \".d\", \"e\", \".b\", \"c\"]\n>           self.assertEqual(customizableplot.available_font_families(),\n                             [\"mock regular\", \"\", \"a\", \".b\", \"c\", \".d\", \"e\"])\n\nr2e_tests/test_1.py:32: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\n    def available_font_families() -> List:\n        \"\"\"\n        Function returns list of available font families.\n        Can be used to instantiate font combo boxes.\n    \n        Returns\n        -------\n        fonts: list\n            List of available font families.\n        \"\"\"\n        if not QApplication.instance():\n            _ = QApplication(sys.argv)\n        fonts = QFontDatabase().families()\n>       default = fonts.pop(fonts.index(default_font_family()))\nE       ValueError: 'mock regular' is not in list\n\nOrange/widgets/visualize/utils/customizableplot.py:31: ValueError\n=========================== short test summary info ============================\nFAILED r2e_tests/test_1.py::TestFonts::test_available_font_families - ValueEr...\n============================== 1 failed in 2.34s ===============================\n",
    "old_commit_res_stderr": ""
}
Orange/widgets/visualize/utils/customizableplot.py Orange/widgets/visualize/utils/tests/test_customizableplot.py
We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[ISSUE]
**Title:** `available_font_families()` Raises ValueError When Default Font is Missing

**Description:**
The `available_font_families()` function fails with a `ValueError` when the default font family is not present in the list of available font families. This issue occurs because the function attempts to remove the default font from the list without verifying its existence, leading to unexpected crashes.

**Example Buggy Code:**
```python
from unittest.mock import patch, Mock

# Mocking QFont to return a default family that is not in the font list
with patch.object(customizableplot, "QFont") as font, \
     patch.object(customizableplot, "QFontDatabase") as db:
    font.return_value.family = Mock(return_value="mock regular")
    db.return_value.families = Mock(return_value=["a", ".d", "e", ".b", "c"])
    
    # This call raises ValueError because "mock regular" is not in the font list
    available_font_families()
```

**Expected Behavior:**
The `available_font_families()` function should handle the absence of the default font family gracefully. Instead of raising an error, it should either skip removing the default font or provide a fallback mechanism, ensuring the function returns a valid list of available fonts without crashing.

**Actual Behavior:**
A `ValueError` is raised with the message `'mock regular' is not in list` when the default font family does not exist in the available fonts.

[/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/visualize/utils/customizableplot.py
import sys
from typing import Tuple, List, Dict, Iterable

from AnyQt.QtCore import Qt
from AnyQt.QtWidgets import QApplication
from AnyQt.QtGui import QFont, QFontDatabase

import pyqtgraph as pg
from pyqtgraph.graphicsItems.LegendItem import ItemSample

from orangewidget.utils.visual_settings_dlg import KeyType, ValueType, \
    SettingsType, FontList

_SettingType = Dict[str, ValueType]
_LegendItemType = Tuple[ItemSample, pg.LabelItem]


def available_font_families() -> List:
    """
    Function returns list of available font families.
    Can be used to instantiate font combo boxes.

    Returns
    -------
    fonts: list
        List of available font families.
    """
    if not QApplication.instance():
        _ = QApplication(sys.argv)
    fonts = QFontDatabase().families()
    default = fonts.pop(fonts.index(default_font_family()))
    defaults = [default]

    guessed_name = default.split()[0]
    i = 0
    while i < len(fonts):
        if fonts[i].startswith(guessed_name):
            defaults.append(fonts.pop(i))
        else:
            i += 1
    return FontList(defaults
                    + [""]
                    + sorted(fonts, key=lambda s: s.replace(".", "")))


def default_font_family() -> str:
    """
    Function returns default font family used in Qt application.
    Can be used to instantiate initial dialog state.

    Returns
    -------
    font: str
        Default font family.
    """
    if not QApplication.instance():
        _ = QApplication(sys.argv)
    return QFont().family()


def default_font_size() -> int:
    """
    Function returns default font size in points used in Qt application.
    Can be used to instantiate initial dialog state.

    Returns
    -------
    size: int
        Default font size in points.
    """
    if not QApplication.instance():
        _ = QApplication(sys.argv)
    return QFont().pointSize()


class Updater:
    """ Class with helper functions and constants. """
    FONT_FAMILY_LABEL, SIZE_LABEL, IS_ITALIC_LABEL = \
        "Font family", "Font size", "Italic"

    WIDTH_LABEL, ALPHA_LABEL, STYLE_LABEL, ANTIALIAS_LABEL = \
        "Width", "Opacity", "Style", "Antialias"
    LINE_STYLES = {"Solid line": Qt.SolidLine,
                   "Dash line": Qt.DashLine,
                   "Dot line": Qt.DotLine,
                   "Dash dot line": Qt.DashDotLine,
                   "Dash dot dot line": Qt.DashDotDotLine}
    DEFAULT_LINE_STYLE = "Solid line"

    @staticmethod
    def update_plot_title_text(title_item: pg.LabelItem, text: str):
        title_item.text = text
        title_item.setVisible(bool(text))
        title_item.item.setPlainText(text)
        Updater.plot_title_resize(title_item)

    @staticmethod
    def update_plot_title_font(title_item: pg.LabelItem,
                               **settings: _SettingType):
        font = Updater.change_font(title_item.item.font(), settings)
        title_item.item.setFont(font)
        title_item.item.setPlainText(title_item.text)
        Updater.plot_title_resize(title_item)

    @staticmethod
    def plot_title_resize(title_item):
        height = title_item.item.boundingRect().height() + 6 \
            if title_item.text else 0
        title_item.setMaximumHeight(height)
        title_item.parentItem().layout.setRowFixedHeight(0, height)
        title_item.resizeEvent(None)

    @staticmethod
    def update_axis_title_text(item: pg.AxisItem, text: str):
        item.setLabel(text)
        item.resizeEvent(None)

    @staticmethod
    def update_axes_titles_font(items: List[pg.AxisItem],
                                **settings: _SettingType):
        for item in items:
            font = Updater.change_font(item.label.font(), settings)
            item.label.setFont(font)
            fstyle = ["normal", "italic"][font.italic()]
            style = {"font-size": f"{font.pointSize()}pt",
                     "font-family": f"{font.family()}",
                     "font-style": f"{fstyle}"}
            item.setLabel(None, None, None, **style)

    @staticmethod
    def update_axes_ticks_font(items: List[pg.AxisItem],
                               **settings: _SettingType):
        for item in items:
            font = item.style["tickFont"] or QFont()
            # remove when contained in setTickFont() - version 0.11.0
            item.style['tickFont'] = font
            item.setTickFont(Updater.change_font(font, settings))

    @staticmethod
    def update_legend_font(items: Iterable[_LegendItemType],
                           **settings: _SettingType):
        for sample, label in items:
            sample.setFixedHeight(sample.height())
            sample.setFixedWidth(sample.width())
            label.item.setFont(Updater.change_font(label.item.font(), settings))
            bounds = label.itemRect()
            label.setMaximumWidth(bounds.width())
            label.setMaximumHeight(bounds.height())
            label.updateMin()
            label.resizeEvent(None)
            label.updateGeometry()

    @staticmethod
    def update_num_legend_font(legend: pg.LegendItem,
                               **settings: _SettingType):
        if not legend:
            return
        for sample, _ in legend.items:
            sample.set_font(Updater.change_font(sample.font, settings))
            legend.setGeometry(sample.boundingRect())

    @staticmethod
    def update_label_font(items: List[pg.TextItem], font: QFont):
        for item in items:
            item.setFont(font)

    @staticmethod
    def change_font(font: QFont, settings: _SettingType) -> QFont:
        assert all(s in (Updater.FONT_FAMILY_LABEL, Updater.SIZE_LABEL,
                         Updater.IS_ITALIC_LABEL) for s in settings), settings

        family = settings.get(Updater.FONT_FAMILY_LABEL)
        if family is not None:
            font.setFamily(family)
        size = settings.get(Updater.SIZE_LABEL)
        if size is not None:
            font.setPointSize(size)
        italic = settings.get(Updater.IS_ITALIC_LABEL)
        if italic is not None:
            font.setItalic(italic)
        return font

    @staticmethod
    def update_lines(items: List[pg.PlotCurveItem], **settings: _SettingType):
        for item in items:
            antialias = settings.get(Updater.ANTIALIAS_LABEL)
            if antialias is not None:
                item.setData(item.xData, item.yData, antialias=antialias)

            pen = item.opts["pen"]
            alpha = settings.get(Updater.ALPHA_LABEL)
            if alpha is not None:
                color = pen.color()
                color.setAlpha(alpha)
                pen.setColor(color)

            style = settings.get(Updater.STYLE_LABEL)
            if style is not None:
                pen.setStyle(Updater.LINE_STYLES[style])

            width = settings.get(Updater.WIDTH_LABEL)
            if width is not None:
                pen.setWidth(width)

            item.setPen(pen)


class CommonParameterSetter:
    """ Subclass to add 'setter' functionality to a plot. """
    LABELS_BOX = "Fonts"
    ANNOT_BOX = "Annotations"
    PLOT_BOX = "Figure"

    FONT_FAMILY_LABEL = "Font family"
    AXIS_TITLE_LABEL = "Axis title"
    AXIS_TICKS_LABEL = "Axis ticks"
    LEGEND_LABEL = "Legend"
    LABEL_LABEL = "Label"
    X_AXIS_LABEL = "x-axis title"
    Y_AXIS_LABEL = "y-axis title"
    TITLE_LABEL = "Title"

    FONT_FAMILY_SETTING = None  # set in __init__ because it requires a running QApplication
    FONT_SETTING = None  # set in __init__ because it requires a running QApplication
    LINE_SETTING: SettingsType = {
        Updater.WIDTH_LABEL: (range(1, 15), 1),
        Updater.ALPHA_LABEL: (range(0, 255, 5), 255),
        Updater.STYLE_LABEL: (list(Updater.LINE_STYLES), Updater.DEFAULT_LINE_STYLE),
        Updater.ANTIALIAS_LABEL: (None, False),
    }

    def __init__(self):
        def update_font_family(**settings):
            # false positive, pylint: disable=unsubscriptable-object
            for label in self.initial_settings[self.LABELS_BOX]:
                if label != self.FONT_FAMILY_LABEL:
                    setter = self._setters[self.LABELS_BOX][label]
                    setter(**settings)

        def update_title(**settings):
            Updater.update_plot_title_font(self.title_item, **settings)

        def update_label(**settings):
            self.label_font = Updater.change_font(self.label_font, settings)
            Updater.update_label_font(self.labels, self.label_font)

        def update_axes_titles(**settings):
            Updater.update_axes_titles_font(self.axis_items, **settings)

        def update_axes_ticks(**settings):
            Updater.update_axes_ticks_font(self.axis_items, **settings)

        def update_legend(**settings):
            self.legend_settings.update(**settings)
            Updater.update_legend_font(self.legend_items, **settings)

        def update_title_text(**settings):
            Updater.update_plot_title_text(
                self.title_item, settings[self.TITLE_LABEL])

        def update_axis(axis, **settings):
            Updater.update_axis_title_text(
                self.getAxis(axis), settings[self.TITLE_LABEL])

        self.FONT_FAMILY_SETTING: SettingsType = {  # pylint: disable=invalid-name
            Updater.FONT_FAMILY_LABEL: (available_font_families(), QFont().family()),
        }

        self.FONT_SETTING: SettingsType = {  # pylint: disable=invalid-name
            Updater.SIZE_LABEL: (range(4, 50), QFont().pointSize()),
            Updater.IS_ITALIC_LABEL: (None, False)
        }

        self.label_font = QFont()
        self.legend_settings = {}

        self._setters = {
            self.LABELS_BOX: {
                self.FONT_FAMILY_LABEL: update_font_family,
                self.TITLE_LABEL: update_title,
                self.LABEL_LABEL: update_label,
                self.AXIS_TITLE_LABEL: update_axes_titles,
                self.AXIS_TICKS_LABEL: update_axes_ticks,
                self.LEGEND_LABEL: update_legend,
            },
            self.ANNOT_BOX: {
                self.TITLE_LABEL: update_title_text,
                self.X_AXIS_LABEL: lambda **kw: update_axis("bottom", **kw),
                self.Y_AXIS_LABEL: lambda **kw: update_axis("left", **kw),
            }
        }

        self.initial_settings: Dict[str, Dict[str, SettingsType]] = NotImplemented

        self.update_setters()
        self._check_setters()

    def update_setters(self):
        pass

    def _check_setters(self):
        # false positive, pylint: disable=not-an-iterable
        assert all(key in self._setters for key in self.initial_settings)
        for k, inner in self.initial_settings.items():
            assert all(key in self._setters[k] for key in inner)

    def set_parameter(self, key: KeyType, value: ValueType):
        self._setters[key[0]][key[1]](**{key[2]: value})

```
--- 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:** `available_font_families()` Raises ValueError When Default Font is Missing

**Description:**
The `available_font_families()` function fails with a `ValueError` when the default font family is not present in the list of available font families. This issue occurs because the function attempts to remove the default font from the list without verifying its existence, leading to unexpected crashes.

**Example Buggy Code:**
```python
from unittest.mock import patch, Mock

# Mocking QFont to return a default family that is not in the font list
with patch.object(customizableplot, "QFont") as font, \
     patch.object(customizableplot, "QFontDatabase") as db:
    font.return_value.family = Mock(return_value="mock regular")
    db.return_value.families = Mock(return_value=["a", ".d", "e", ".b", "c"])
    
    # This call raises ValueError because "mock regular" is not in the font list
    available_font_families()
```

**Expected Behavior:**
The `available_font_families()` function should handle the absence of the default font family gracefully. Instead of raising an error, it should either skip removing the default font or provide a fallback mechanism, ensuring the function returns a valid list of available fonts without crashing.

**Actual Behavior:**
A `ValueError` is raised with the message `'mock regular' is not in list` when the default font family does not exist in the available fonts.

[/ISSUE]
{
    "TestFonts.test_available_font_families": "PASSED"
}
diff --git a/Orange/widgets/visualize/utils/customizableplot.py b/Orange/widgets/visualize/utils/customizableplot.py
index afdc0ecfa..f9655a268 100644
--- a/Orange/widgets/visualize/utils/customizableplot.py
+++ b/Orange/widgets/visualize/utils/customizableplot.py
@@ -28,8 +28,11 @@ def available_font_families() -> List:
     if not QApplication.instance():
         _ = QApplication(sys.argv)
     fonts = QFontDatabase().families()
-    default = fonts.pop(fonts.index(default_font_family()))
+    default = default_font_family()
+
     defaults = [default]
+    if default in fonts:
+        fonts.remove(default)
 
     guessed_name = default.split()[0]
     i = 0
@@ -263,7 +266,7 @@ class CommonParameterSetter:
                 self.getAxis(axis), settings[self.TITLE_LABEL])
 
         self.FONT_FAMILY_SETTING: SettingsType = {  # pylint: disable=invalid-name
-            Updater.FONT_FAMILY_LABEL: (available_font_families(), QFont().family()),
+            Updater.FONT_FAMILY_LABEL: (available_font_families(), default_font_family()),
         }
 
         self.FONT_SETTING: SettingsType = {  # pylint: disable=invalid-name

{"Orange/widgets/visualize/utils/customizableplot.py": "import sys\nfrom typing import Tuple, List, Dict, Iterable\n\nfrom AnyQt.QtCore import Qt\nfrom AnyQt.QtWidgets import QApplication\nfrom AnyQt.QtGui import QFont, QFontDatabase\n\nimport pyqtgraph as pg\nfrom pyqtgraph.graphicsItems.LegendItem import ItemSample\n\nfrom orangewidget.utils.visual_settings_dlg import KeyType, ValueType, \\\n    SettingsType, FontList\n\n_SettingType = Dict[str, ValueType]\n_LegendItemType = Tuple[ItemSample, pg.LabelItem]\n\n\ndef available_font_families() -> List:\n    \"\"\"\n    Function returns list of available font families.\n    Can be used to instantiate font combo boxes.\n\n    Returns\n    -------\n    fonts: list\n        List of available font families.\n    \"\"\"\n    if not QApplication.instance():\n        _ = QApplication(sys.argv)\n    fonts = QFontDatabase().families()\n    default = fonts.pop(fonts.index(default_font_family()))\n    defaults = [default]\n\n    guessed_name = default.split()[0]\n    i = 0\n    while i < len(fonts):\n        if fonts[i].startswith(guessed_name):\n            defaults.append(fonts.pop(i))\n        else:\n            i += 1\n    return FontList(defaults\n                    + [\"\"]\n                    + sorted(fonts, key=lambda s: s.replace(\".\", \"\")))\n\n\ndef default_font_family() -> str:\n    \"\"\"\n    Function returns default font family used in Qt application.\n    Can be used to instantiate initial dialog state.\n\n    Returns\n    -------\n    font: str\n        Default font family.\n    \"\"\"\n    if not QApplication.instance():\n        _ = QApplication(sys.argv)\n    return QFont().family()\n\n\ndef default_font_size() -> int:\n    \"\"\"\n    Function returns default font size in points used in Qt application.\n    Can be used to instantiate initial dialog state.\n\n    Returns\n    -------\n    size: int\n        Default font size in points.\n    \"\"\"\n    if not QApplication.instance():\n        _ = QApplication(sys.argv)\n    return QFont().pointSize()\n\n\nclass Updater:\n    \"\"\" Class with helper functions and constants. \"\"\"\n    FONT_FAMILY_LABEL, SIZE_LABEL, IS_ITALIC_LABEL = \\\n        \"Font family\", \"Font size\", \"Italic\"\n\n    WIDTH_LABEL, ALPHA_LABEL, STYLE_LABEL, ANTIALIAS_LABEL = \\\n        \"Width\", \"Opacity\", \"Style\", \"Antialias\"\n    LINE_STYLES = {\"Solid line\": Qt.SolidLine,\n                   \"Dash line\": Qt.DashLine,\n                   \"Dot line\": Qt.DotLine,\n                   \"Dash dot line\": Qt.DashDotLine,\n                   \"Dash dot dot line\": Qt.DashDotDotLine}\n    DEFAULT_LINE_STYLE = \"Solid line\"\n\n    @staticmethod\n    def update_plot_title_text(title_item: pg.LabelItem, text: str):\n        title_item.text = text\n        title_item.setVisible(bool(text))\n        title_item.item.setPlainText(text)\n        Updater.plot_title_resize(title_item)\n\n    @staticmethod\n    def update_plot_title_font(title_item: pg.LabelItem,\n                               **settings: _SettingType):\n        font = Updater.change_font(title_item.item.font(), settings)\n        title_item.item.setFont(font)\n        title_item.item.setPlainText(title_item.text)\n        Updater.plot_title_resize(title_item)\n\n    @staticmethod\n    def plot_title_resize(title_item):\n        height = title_item.item.boundingRect().height() + 6 \\\n            if title_item.text else 0\n        title_item.setMaximumHeight(height)\n        title_item.parentItem().layout.setRowFixedHeight(0, height)\n        title_item.resizeEvent(None)\n\n    @staticmethod\n    def update_axis_title_text(item: pg.AxisItem, text: str):\n        item.setLabel(text)\n        item.resizeEvent(None)\n\n    @staticmethod\n    def update_axes_titles_font(items: List[pg.AxisItem],\n                                **settings: _SettingType):\n        for item in items:\n            font = Updater.change_font(item.label.font(), settings)\n            item.label.setFont(font)\n            fstyle = [\"normal\", \"italic\"][font.italic()]\n            style = {\"font-size\": f\"{font.pointSize()}pt\",\n                     \"font-family\": f\"{font.family()}\",\n                     \"font-style\": f\"{fstyle}\"}\n            item.setLabel(None, None, None, **style)\n\n    @staticmethod\n    def update_axes_ticks_font(items: List[pg.AxisItem],\n                               **settings: _SettingType):\n        for item in items:\n            font = item.style[\"tickFont\"] or QFont()\n            # remove when contained in setTickFont() - version 0.11.0\n            item.style['tickFont'] = font\n            item.setTickFont(Updater.change_font(font, settings))\n\n    @staticmethod\n    def update_legend_font(items: Iterable[_LegendItemType],\n                           **settings: _SettingType):\n        for sample, label in items:\n            sample.setFixedHeight(sample.height())\n            sample.setFixedWidth(sample.width())\n            label.item.setFont(Updater.change_font(label.item.font(), settings))\n            bounds = label.itemRect()\n            label.setMaximumWidth(bounds.width())\n            label.setMaximumHeight(bounds.height())\n            label.updateMin()\n            label.resizeEvent(None)\n            label.updateGeometry()\n\n    @staticmethod\n    def update_num_legend_font(legend: pg.LegendItem,\n                               **settings: _SettingType):\n        if not legend:\n            return\n        for sample, _ in legend.items:\n            sample.set_font(Updater.change_font(sample.font, settings))\n            legend.setGeometry(sample.boundingRect())\n\n    @staticmethod\n    def update_label_font(items: List[pg.TextItem], font: QFont):\n        for item in items:\n            item.setFont(font)\n\n    @staticmethod\n    def change_font(font: QFont, settings: _SettingType) -> QFont:\n        assert all(s in (Updater.FONT_FAMILY_LABEL, Updater.SIZE_LABEL,\n                         Updater.IS_ITALIC_LABEL) for s in settings), settings\n\n        family = settings.get(Updater.FONT_FAMILY_LABEL)\n        if family is not None:\n            font.setFamily(family)\n        size = settings.get(Updater.SIZE_LABEL)\n        if size is not None:\n            font.setPointSize(size)\n        italic = settings.get(Updater.IS_ITALIC_LABEL)\n        if italic is not None:\n            font.setItalic(italic)\n        return font\n\n    @staticmethod\n    def update_lines(items: List[pg.PlotCurveItem], **settings: _SettingType):\n        for item in items:\n            antialias = settings.get(Updater.ANTIALIAS_LABEL)\n            if antialias is not None:\n                item.setData(item.xData, item.yData, antialias=antialias)\n\n            pen = item.opts[\"pen\"]\n            alpha = settings.get(Updater.ALPHA_LABEL)\n            if alpha is not None:\n                color = pen.color()\n                color.setAlpha(alpha)\n                pen.setColor(color)\n\n            style = settings.get(Updater.STYLE_LABEL)\n            if style is not None:\n                pen.setStyle(Updater.LINE_STYLES[style])\n\n            width = settings.get(Updater.WIDTH_LABEL)\n            if width is not None:\n                pen.setWidth(width)\n\n            item.setPen(pen)\n\n\nclass CommonParameterSetter:\n    \"\"\" Subclass to add 'setter' functionality to a plot. \"\"\"\n    LABELS_BOX = \"Fonts\"\n    ANNOT_BOX = \"Annotations\"\n    PLOT_BOX = \"Figure\"\n\n    FONT_FAMILY_LABEL = \"Font family\"\n    AXIS_TITLE_LABEL = \"Axis title\"\n    AXIS_TICKS_LABEL = \"Axis ticks\"\n    LEGEND_LABEL = \"Legend\"\n    LABEL_LABEL = \"Label\"\n    X_AXIS_LABEL = \"x-axis title\"\n    Y_AXIS_LABEL = \"y-axis title\"\n    TITLE_LABEL = \"Title\"\n\n    FONT_FAMILY_SETTING = None  # set in __init__ because it requires a running QApplication\n    FONT_SETTING = None  # set in __init__ because it requires a running QApplication\n    LINE_SETTING: SettingsType = {\n        Updater.WIDTH_LABEL: (range(1, 15), 1),\n        Updater.ALPHA_LABEL: (range(0, 255, 5), 255),\n        Updater.STYLE_LABEL: (list(Updater.LINE_STYLES), Updater.DEFAULT_LINE_STYLE),\n        Updater.ANTIALIAS_LABEL: (None, False),\n    }\n\n    def __init__(self):\n        def update_font_family(**settings):\n            # false positive, pylint: disable=unsubscriptable-object\n            for label in self.initial_settings[self.LABELS_BOX]:\n                if label != self.FONT_FAMILY_LABEL:\n                    setter = self._setters[self.LABELS_BOX][label]\n                    setter(**settings)\n\n        def update_title(**settings):\n            Updater.update_plot_title_font(self.title_item, **settings)\n\n        def update_label(**settings):\n            self.label_font = Updater.change_font(self.label_font, settings)\n            Updater.update_label_font(self.labels, self.label_font)\n\n        def update_axes_titles(**settings):\n            Updater.update_axes_titles_font(self.axis_items, **settings)\n\n        def update_axes_ticks(**settings):\n            Updater.update_axes_ticks_font(self.axis_items, **settings)\n\n        def update_legend(**settings):\n            self.legend_settings.update(**settings)\n            Updater.update_legend_font(self.legend_items, **settings)\n\n        def update_title_text(**settings):\n            Updater.update_plot_title_text(\n                self.title_item, settings[self.TITLE_LABEL])\n\n        def update_axis(axis, **settings):\n            Updater.update_axis_title_text(\n                self.getAxis(axis), settings[self.TITLE_LABEL])\n\n        self.FONT_FAMILY_SETTING: SettingsType = {  # pylint: disable=invalid-name\n            Updater.FONT_FAMILY_LABEL: (available_font_families(), QFont().family()),\n        }\n\n        self.FONT_SETTING: SettingsType = {  # pylint: disable=invalid-name\n            Updater.SIZE_LABEL: (range(4, 50), QFont().pointSize()),\n            Updater.IS_ITALIC_LABEL: (None, False)\n        }\n\n        self.label_font = QFont()\n        self.legend_settings = {}\n\n        self._setters = {\n            self.LABELS_BOX: {\n                self.FONT_FAMILY_LABEL: update_font_family,\n                self.TITLE_LABEL: update_title,\n                self.LABEL_LABEL: update_label,\n                self.AXIS_TITLE_LABEL: update_axes_titles,\n                self.AXIS_TICKS_LABEL: update_axes_ticks,\n                self.LEGEND_LABEL: update_legend,\n            },\n            self.ANNOT_BOX: {\n                self.TITLE_LABEL: update_title_text,\n                self.X_AXIS_LABEL: lambda **kw: update_axis(\"bottom\", **kw),\n                self.Y_AXIS_LABEL: lambda **kw: update_axis(\"left\", **kw),\n            }\n        }\n\n        self.initial_settings: Dict[str, Dict[str, SettingsType]] = NotImplemented\n\n        self.update_setters()\n        self._check_setters()\n\n    def update_setters(self):\n        pass\n\n    def _check_setters(self):\n        # false positive, pylint: disable=not-an-iterable\n        assert all(key in self._setters for key in self.initial_settings)\n        for k, inner in self.initial_settings.items():\n            assert all(key in self._setters[k] for key in inner)\n\n    def set_parameter(self, key: KeyType, value: ValueType):\n        self._setters[key[0]][key[1]](**{key[2]: value})\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:** `available_font_families()` Raises ValueError When Default Font is Missing

**Description:**
The `available_font_families()` function fails with a `ValueError` when the default font family is not present in the list of available font families. This issue occurs because the function attempts to remove the default font from the list without verifying its existence, leading to unexpected crashes.

**Example Buggy Code:**
```python
from unittest.mock import patch, Mock

# Mocking QFont to return a default family that is not in the font list
with patch.object(customizableplot, "QFont") as font, \
     patch.object(customizableplot, "QFontDatabase") as db:
    font.return_value.family = Mock(return_value="mock regular")
    db.return_value.families = Mock(return_value=["a", ".d", "e", ".b", "c"])
    
    # This call raises ValueError because "mock regular" is not in the font list
    available_font_families()
```

**Expected Behavior:**
The `available_font_families()` function should handle the absence of the default font family gracefully. Instead of raising an error, it should either skip removing the default font or provide a fallback mechanism, ensuring the function returns a valid list of available fonts without crashing.

**Actual Behavior:**
A `ValueError` is raised with the message `'mock regular' is not in list` when the default font family does not exist in the available fonts.

[/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/visualize/utils/customizableplot.py
import sys
from typing import Tuple, List, Dict, Iterable

from AnyQt.QtCore import Qt
from AnyQt.QtWidgets import QApplication
from AnyQt.QtGui import QFont, QFontDatabase

import pyqtgraph as pg
from pyqtgraph.graphicsItems.LegendItem import ItemSample

from orangewidget.utils.visual_settings_dlg import KeyType, ValueType, \
    SettingsType, FontList

_SettingType = Dict[str, ValueType]
_LegendItemType = Tuple[ItemSample, pg.LabelItem]


def available_font_families() -> List:
    """
    Function returns list of available font families.
    Can be used to instantiate font combo boxes.

    Returns
    -------
    fonts: list
        List of available font families.
    """
    if not QApplication.instance():
        _ = QApplication(sys.argv)
    fonts = QFontDatabase().families()
    default = fonts.pop(fonts.index(default_font_family()))
    defaults = [default]

    guessed_name = default.split()[0]
    i = 0
    while i < len(fonts):
        if fonts[i].startswith(guessed_name):
            defaults.append(fonts.pop(i))
        else:
            i += 1
    return FontList(defaults
                    + [""]
                    + sorted(fonts, key=lambda s: s.replace(".", "")))


def default_font_family() -> str:
    """
    Function returns default font family used in Qt application.
    Can be used to instantiate initial dialog state.

    Returns
    -------
    font: str
        Default font family.
    """
    if not QApplication.instance():
        _ = QApplication(sys.argv)
    return QFont().family()


def default_font_size() -> int:
    """
    Function returns default font size in points used in Qt application.
    Can be used to instantiate initial dialog state.

    Returns
    -------
    size: int
        Default font size in points.
    """
    if not QApplication.instance():
        _ = QApplication(sys.argv)
    return QFont().pointSize()


class Updater:
    """ Class with helper functions and constants. """
    FONT_FAMILY_LABEL, SIZE_LABEL, IS_ITALIC_LABEL = \
        "Font family", "Font size", "Italic"

    WIDTH_LABEL, ALPHA_LABEL, STYLE_LABEL, ANTIALIAS_LABEL = \
        "Width", "Opacity", "Style", "Antialias"
    LINE_STYLES = {"Solid line": Qt.SolidLine,
                   "Dash line": Qt.DashLine,
                   "Dot line": Qt.DotLine,
                   "Dash dot line": Qt.DashDotLine,
                   "Dash dot dot line": Qt.DashDotDotLine}
    DEFAULT_LINE_STYLE = "Solid line"

    @staticmethod
    def update_plot_title_text(title_item: pg.LabelItem, text: str):
        title_item.text = text
        title_item.setVisible(bool(text))
        title_item.item.setPlainText(text)
        Updater.plot_title_resize(title_item)

    @staticmethod
    def update_plot_title_font(title_item: pg.LabelItem,
                               **settings: _SettingType):
        font = Updater.change_font(title_item.item.font(), settings)
        title_item.item.setFont(font)
        title_item.item.setPlainText(title_item.text)
        Updater.plot_title_resize(title_item)

    @staticmethod
    def plot_title_resize(title_item):
        height = title_item.item.boundingRect().height() + 6 \
            if title_item.text else 0
        title_item.setMaximumHeight(height)
        title_item.parentItem().layout.setRowFixedHeight(0, height)
        title_item.resizeEvent(None)

    @staticmethod
    def update_axis_title_text(item: pg.AxisItem, text: str):
        item.setLabel(text)
        item.resizeEvent(None)

    @staticmethod
    def update_axes_titles_font(items: List[pg.AxisItem],
                                **settings: _SettingType):
        for item in items:
            font = Updater.change_font(item.label.font(), settings)
            item.label.setFont(font)
            fstyle = ["normal", "italic"][font.italic()]
            style = {"font-size": f"{font.pointSize()}pt",
                     "font-family": f"{font.family()}",
                     "font-style": f"{fstyle}"}
            item.setLabel(None, None, None, **style)

    @staticmethod
    def update_axes_ticks_font(items: List[pg.AxisItem],
                               **settings: _SettingType):
        for item in items:
            font = item.style["tickFont"] or QFont()
            # remove when contained in setTickFont() - version 0.11.0
            item.style['tickFont'] = font
            item.setTickFont(Updater.change_font(font, settings))

    @staticmethod
    def update_legend_font(items: Iterable[_LegendItemType],
                           **settings: _SettingType):
        for sample, label in items:
            sample.setFixedHeight(sample.height())
            sample.setFixedWidth(sample.width())
            label.item.setFont(Updater.change_font(label.item.font(), settings))
            bounds = label.itemRect()
            label.setMaximumWidth(bounds.width())
            label.setMaximumHeight(bounds.height())
            label.updateMin()
            label.resizeEvent(None)
            label.updateGeometry()

    @staticmethod
    def update_num_legend_font(legend: pg.LegendItem,
                               **settings: _SettingType):
        if not legend:
            return
        for sample, _ in legend.items:
            sample.set_font(Updater.change_font(sample.font, settings))
            legend.setGeometry(sample.boundingRect())

    @staticmethod
    def update_label_font(items: List[pg.TextItem], font: QFont):
        for item in items:
            item.setFont(font)

    @staticmethod
    def change_font(font: QFont, settings: _SettingType) -> QFont:
        assert all(s in (Updater.FONT_FAMILY_LABEL, Updater.SIZE_LABEL,
                         Updater.IS_ITALIC_LABEL) for s in settings), settings

        family = settings.get(Updater.FONT_FAMILY_LABEL)
        if family is not None:
            font.setFamily(family)
        size = settings.get(Updater.SIZE_LABEL)
        if size is not None:
            font.setPointSize(size)
        italic = settings.get(Updater.IS_ITALIC_LABEL)
        if italic is not None:
            font.setItalic(italic)
        return font

    @staticmethod
    def update_lines(items: List[pg.PlotCurveItem], **settings: _SettingType):
        for item in items:
            antialias = settings.get(Updater.ANTIALIAS_LABEL)
            if antialias is not None:
                item.setData(item.xData, item.yData, antialias=antialias)

            pen = item.opts["pen"]
            alpha = settings.get(Updater.ALPHA_LABEL)
            if alpha is not None:
                color = pen.color()
                color.setAlpha(alpha)
                pen.setColor(color)

            style = settings.get(Updater.STYLE_LABEL)
            if style is not None:
                pen.setStyle(Updater.LINE_STYLES[style])

            width = settings.get(Updater.WIDTH_LABEL)
            if width is not None:
                pen.setWidth(width)

            item.setPen(pen)


class CommonParameterSetter:
    """ Subclass to add 'setter' functionality to a plot. """
    LABELS_BOX = "Fonts"
    ANNOT_BOX = "Annotations"
    PLOT_BOX = "Figure"

    FONT_FAMILY_LABEL = "Font family"
    AXIS_TITLE_LABEL = "Axis title"
    AXIS_TICKS_LABEL = "Axis ticks"
    LEGEND_LABEL = "Legend"
    LABEL_LABEL = "Label"
    X_AXIS_LABEL = "x-axis title"
    Y_AXIS_LABEL = "y-axis title"
    TITLE_LABEL = "Title"

    FONT_FAMILY_SETTING = None  # set in __init__ because it requires a running QApplication
    FONT_SETTING = None  # set in __init__ because it requires a running QApplication
    LINE_SETTING: SettingsType = {
        Updater.WIDTH_LABEL: (range(1, 15), 1),
        Updater.ALPHA_LABEL: (range(0, 255, 5), 255),
        Updater.STYLE_LABEL: (list(Updater.LINE_STYLES), Updater.DEFAULT_LINE_STYLE),
        Updater.ANTIALIAS_LABEL: (None, False),
    }

    def __init__(self):
        def update_font_family(**settings):
            # false positive, pylint: disable=unsubscriptable-object
            for label in self.initial_settings[self.LABELS_BOX]:
                if label != self.FONT_FAMILY_LABEL:
                    setter = self._setters[self.LABELS_BOX][label]
                    setter(**settings)

        def update_title(**settings):
            Updater.update_plot_title_font(self.title_item, **settings)

        def update_label(**settings):
            self.label_font = Updater.change_font(self.label_font, settings)
            Updater.update_label_font(self.labels, self.label_font)

        def update_axes_titles(**settings):
            Updater.update_axes_titles_font(self.axis_items, **settings)

        def update_axes_ticks(**settings):
            Updater.update_axes_ticks_font(self.axis_items, **settings)

        def update_legend(**settings):
            self.legend_settings.update(**settings)
            Updater.update_legend_font(self.legend_items, **settings)

        def update_title_text(**settings):
            Updater.update_plot_title_text(
                self.title_item, settings[self.TITLE_LABEL])

        def update_axis(axis, **settings):
            Updater.update_axis_title_text(
                self.getAxis(axis), settings[self.TITLE_LABEL])

        self.FONT_FAMILY_SETTING: SettingsType = {  # pylint: disable=invalid-name
            Updater.FONT_FAMILY_LABEL: (available_font_families(), QFont().family()),
        }

        self.FONT_SETTING: SettingsType = {  # pylint: disable=invalid-name
            Updater.SIZE_LABEL: (range(4, 50), QFont().pointSize()),
            Updater.IS_ITALIC_LABEL: (None, False)
        }

        self.label_font = QFont()
        self.legend_settings = {}

        self._setters = {
            self.LABELS_BOX: {
                self.FONT_FAMILY_LABEL: update_font_family,
                self.TITLE_LABEL: update_title,
                self.LABEL_LABEL: update_label,
                self.AXIS_TITLE_LABEL: update_axes_titles,
                self.AXIS_TICKS_LABEL: update_axes_ticks,
                self.LEGEND_LABEL: update_legend,
            },
            self.ANNOT_BOX: {
                self.TITLE_LABEL: update_title_text,
                self.X_AXIS_LABEL: lambda **kw: update_axis("bottom", **kw),
                self.Y_AXIS_LABEL: lambda **kw: update_axis("left", **kw),
            }
        }

        self.initial_settings: Dict[str, Dict[str, SettingsType]] = NotImplemented

        self.update_setters()
        self._check_setters()

    def update_setters(self):
        pass

    def _check_setters(self):
        # false positive, pylint: disable=not-an-iterable
        assert all(key in self._setters for key in self.initial_settings)
        for k, inner in self.initial_settings.items():
            assert all(key in self._setters[k] for key in inner)

    def set_parameter(self, key: KeyType, value: ValueType):
        self._setters[key[0]][key[1]](**{key[2]: value})

```
--- 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