From 476093e44bc73e27d27f72b54b0276d3099bf2e5 Mon Sep 17 00:00:00 2001 From: nyanpasu64 Date: Wed, 6 Mar 2019 22:27:12 -0800 Subject: [PATCH] Fix gui/model_bind.py warnings --- corrscope/gui/data_bind.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/corrscope/gui/data_bind.py b/corrscope/gui/data_bind.py index fe31e37..b2f9e68 100644 --- a/corrscope/gui/data_bind.py +++ b/corrscope/gui/data_bind.py @@ -24,7 +24,7 @@ __all__ = ["PresentationModel", "map_gui", "behead", "rgetattr", "rsetattr", "Sy Signal = Any WidgetUpdater = Callable[[], None] -Symbol = NewType("Symbol", Hashable) +Symbol = Hashable # Data binding presentation-model @@ -268,7 +268,7 @@ class BoundComboBox(qw.QComboBox, BoundWidget): symbol2idx: Dict[Symbol, int] # noinspection PyAttributeOutsideInit - def bind_widget(self, model: PresentationModel, path: str) -> None: + def bind_widget(self, model: PresentationModel, path: str, *args, **kwargs) -> None: # Effectively enum values. self.combo_symbols = model.combo_symbols[path] @@ -281,7 +281,7 @@ class BoundComboBox(qw.QComboBox, BoundWidget): self.symbol2idx[symbol] = i self.addItem(combo_text[i]) - BoundWidget.bind_widget(self, model, path) + BoundWidget.bind_widget(self, model, path, *args, **kwargs) # combobox.index = pmodel.attr def set_gui(self, symbol: Symbol) -> None: @@ -334,8 +334,8 @@ class BoundColorWidget(BoundWidget, qw.QWidget): layout.addWidget(self.button) # override BoundWidget - def bind_widget(self, model: PresentationModel, path: str) -> None: - super().bind_widget(model, path) + def bind_widget(self, model: PresentationModel, path: str, *args, **kwargs) -> None: + super().bind_widget(model, path, *args, **kwargs) self.text.bind_widget(model, path, connect_to_model=False) # impl BoundWidget