Philipp Hörist pushed to branch master at gajim / gajim


Commits:
fc4a56e2 by Philipp Hörist at 2022-12-13T22:38:08+01:00
cq: Typecheck more modules

- - - - -


3 changed files:

- gajim/gtk/groupchat_manage.py
- gajim/gtk/profile.py
- pyproject.toml


Changes:

=====================================
gajim/gtk/groupchat_manage.py
=====================================
@@ -236,7 +236,7 @@ def _on_avatar_update_clicked(self, _button: Gtk.Button) -> 
None:
             return
 
         vcard = VCard()
-        vcard.set_avatar(data, 'image/png')
+        vcard.set_avatar(data, 'image/png')  # pyright: ignore
 
         self._client.get_module('VCardTemp').set_vcard(
             vcard,


=====================================
gajim/gtk/profile.py
=====================================
@@ -237,7 +237,7 @@ def _on_cancel_clicked(self, _button: Gtk.Button) -> None:
         self._ui.nickname_entry.set_sensitive(False)
         self._ui.avatar_image.set_from_surface(self._current_avatar)
         self._ui.nickname_entry.set_text(app.nicks[self.account])
-        self._vcard_grid.set_vcard(self._current_vcard.copy())
+        self._vcard_grid.set_vcard(self._current_vcard.copy())  # pyright: 
ignore # noqa
         self._new_avatar = False
 
     def _on_save_clicked(self, _button: Gtk.Button) -> None:
@@ -256,7 +256,7 @@ def _on_save_clicked(self, _button: Gtk.Button) -> None:
         self._vcard_grid.sort()
 
         vcard = self._vcard_grid.get_vcard()
-        self._current_vcard = vcard.copy()
+        self._current_vcard = vcard.copy()  # pyright: ignore
 
         client = app.get_client(self.account)
         client.get_module('VCard4').set_vcard(
@@ -355,7 +355,8 @@ def _on_update_avatar(self, _button: Gtk.Button) -> None:
             return
 
         self._new_avatar = Avatar()
-        self._new_avatar.add_image_source(data, 'image/png', height, width)
+        self._new_avatar.add_image_source(data, 'image/png', height, width)  # 
pyright: ignore  # noqa
+        self._new_avatar = False
 
         scale = self.get_scale_factor()
         surface = app.app.avatar_storage.surface_from_filename(


=====================================
pyproject.toml
=====================================
@@ -106,6 +106,7 @@ include = [
     "gajim/gtk/groupchat_invitation.py",
     "gajim/gtk/groupchat_inviter.py",
     "gajim/gtk/groupchat_join.py",
+    "gajim/gtk/groupchat_manage.py",
     "gajim/gtk/groupchat_nick.py",
     "gajim/gtk/groupchat_nick_completion.py",
     "gajim/gtk/groupchat_outcasts.py",
@@ -133,6 +134,7 @@ include = [
     "gajim/gtk/preview_audio.py",
     "gajim/gtk/preview_audio_analyzer.py",
     "gajim/gtk/preview_audio_visualizer.py",
+    "gajim/gtk/profile.py",
     "gajim/gtk/proxies.py",
     "gajim/gtk/remove_account.py",
     "gajim/gtk/resource_selector.py",



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/fc4a56e2c1929866eb618ed5ba34b9891dc23ab6

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/fc4a56e2c1929866eb618ed5ba34b9891dc23ab6
You're receiving this email because of your account on dev.gajim.org.


_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits

Reply via email to