From 75f5c13bf6b4b64e71aea0cd3c7bb0c665c777fb Mon Sep 17 00:00:00 2001
From: wurstsalat <mailtrash@posteo.de>
Date: Tue, 31 May 2022 12:22:00 +0200
Subject: [PATCH] fix: AccountsWindow: Point out the window's class

---
 gajim/gtk/accounts.py | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/gajim/gtk/accounts.py b/gajim/gtk/accounts.py
index c5d4f5efd3..eda89adf69 100644
--- a/gajim/gtk/accounts.py
+++ b/gajim/gtk/accounts.py
@@ -565,8 +565,7 @@ def _disable() -> None:
         if (account in app.connections and
                 not app.connections[account].state.is_disconnected):
             # Connecting or connected
-            window = get_app_window('AccountsWindow')
-            assert window is not None
+            window = cast(AccountsWindow, get_app_window('AccountsWindow'))
             ConfirmationDialog(
                 _('Disable Account'),
                 _('Account %s is still connected') % account,
@@ -707,8 +706,7 @@ def __init__(self, account: str) -> None:
         GenericSettingPage.__init__(self, account, settings)
 
     def _on_account_name_change(self, *args: Any) -> None:
-        window = get_app_window('AccountsWindow')
-        assert window is not None
+        window = cast(AccountsWindow, get_app_window('AccountsWindow'))
         window.update_account_label(self.account)
 
 
-- 
GitLab