Daniel Brötzmann pushed to branch newcontrol at gajim / gajim
Commits: b975ba28 by wurstsalat at 2022-07-21T21:04:12+02:00 Settings: Add type annotations for bind_signal - - - - - 1 changed file: - gajim/common/settings.py Changes: ===================================== gajim/common/settings.py ===================================== @@ -146,19 +146,20 @@ def disconnect_signals(self, object_: object) -> Any: handlers.remove(handler) def bind_signal(self, - setting, - widget, - func_name, - account=None, - jid=None, - inverted=False, - default_text=None): + setting: str, + widget: Any, + func_name: str, + account: Optional[str] = None, + jid: Optional[JID] = None, + inverted: bool = False, + default_text: Optional[str] = None + ) -> None: callbacks = self._callbacks[(setting, account, jid)] func = getattr(widget, func_name) callbacks.append((func, inverted, default_text)) - def _on_destroy(*args): + def _on_destroy(*args: Any) -> None: callbacks.remove((func, inverted, default_text)) widget.connect('destroy', _on_destroy) View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/b975ba28537d9ccb1f25d2c44b7ab53b0c850028 -- View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/b975ba28537d9ccb1f25d2c44b7ab53b0c850028 You're receiving this email because of your account on dev.gajim.org.
_______________________________________________ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits