From 5f1bacf8db01f77bd6d96b32f13b8bb8814817f4 Mon Sep 17 00:00:00 2001 From: Boldi Date: Mon, 8 Jul 2024 22:12:21 +0100 Subject: [PATCH] Check for "data" key in SettingsData for ComboBox --- zxlive/settings_dialog.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zxlive/settings_dialog.py b/zxlive/settings_dialog.py index b9e2c63..c3798c9 100644 --- a/zxlive/settings_dialog.py +++ b/zxlive/settings_dialog.py @@ -49,7 +49,7 @@ class SettingsData(TypedDict): id: str label: str type: FormInputType - data: NotRequired[Any] + data: NotRequired[dict[Any, str]] color_scheme_data = { @@ -215,6 +215,7 @@ def browse() -> None: return widget_line def make_combo_form_input(self, data: SettingsData) -> QComboBox: + assert "data" in data name, _data = data["id"], data["data"] value = self.settings.value(name, defaults[name]) widget = QComboBox()