# Buggy code
def save_to_conf(self):
    """Save settings to configuration file"""
    for checkbox, (option, _default) in list(self.checkboxes.items()):
        self.set_option(option, checkbox.isChecked())
    for radiobutton, (option, _default) in list(self.radiobuttons.items()):
        self.set_option(option, radiobutton.isChecked())
    for lineedit, (option, _default) in list(self.lineedits.items()):
        self.set_option(option, to_text_string(lineedit.text()))
    for spinbox, (option, _default) in list(self.spinboxes.items()):
        self.set_option(option, spinbox.value())
    for combobox, (option, _default) in list(self.comboboxes.items()):
        data = combobox.itemData(combobox.currentIndex())
        self.set_option(option, from_qvariant(data, to_text_string))
    for (fontbox, sizebox), option in list(self.fontboxes.items()):
        font = fontbox.currentFont()
        font.setPointSize(sizebox.value())
        self.set_font(font, option)
    for clayout, (option, _default) in list(self.coloredits.items()):
        self.set_option(option, to_text_string(clayout.lineedit.text()))
    for (clayout, cb_bold, cb_italic), (option, _default) in list(self.scedits.items()):
        color = to_text_string(clayout.lineedit.text())
        bold = cb_bold.isChecked()
        italic = cb_italic.isChecked()
        self.set_option(option, (color, bold, italic))


# Traceback (ValueError)
File "C:\Users\C. A. M. Gerlach\Documents\dev\SpyderDev\spyder\spyder\preferences\languageserver.py", line 646, in delete_server
self.table.delete_server(idx)
File "C:\Users\C. A. M. Gerlach\Documents\dev\SpyderDev\spyder\spyder\preferences\languageserver.py", line 554, in delete_server
self.adjust_cells()
File "C:\Users\C. A. M. Gerlach\Documents\dev\SpyderDev\spyder\spyder\preferences\languageserver.py", line 524, in adjust_cells
self.setColumnWidth(CMD, max(names))
ValueError: max() arg is an empty sequence

# Fixed code
def save_to_conf(self):
    """Save settings to configuration file"""
    for checkbox, (option, _default) in list(self.checkboxes.items()):
        self.set_option(option, checkbox.isChecked())
    for radiobutton, (option, _default) in list(self.radiobuttons.items()):
        self.set_option(option, radiobutton.isChecked())
    for lineedit, (option, _default) in list(self.lineedits.items()):
        self.set_option(option, to_text_string(lineedit.text()))
    for textedit, (option, _default) in list(self.textedits.items()):
        self.set_option(option, to_text_string(textedit.toPlainText()))
    for spinbox, (option, _default) in list(self.spinboxes.items()):
        self.set_option(option, spinbox.value())
    for combobox, (option, _default) in list(self.comboboxes.items()):
        data = combobox.itemData(combobox.currentIndex())
        self.set_option(option, from_qvariant(data, to_text_string))
    for (fontbox, sizebox), option in list(self.fontboxes.items()):
        font = fontbox.currentFont()
        font.setPointSize(sizebox.value())
        self.set_font(font, option)
    for clayout, (option, _default) in list(self.coloredits.items()):
        self.set_option(option, to_text_string(clayout.lineedit.text()))
    for (clayout, cb_bold, cb_italic), (option, _default) in list(self.scedits.items()):
        color = to_text_string(clayout.lineedit.text())
        bold = cb_bold.isChecked()
        italic = cb_italic.isChecked()
        self.set_option(option, (color, bold, italic))