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


Commits:
8d3051aa by Philipp Hörist at 2024-06-02T20:12:27+02:00
cq: Ignore some pyright errors

- - - - -


4 changed files:

- gajim/gtk/advanced_config.py
- gajim/gtk/exception.py
- gajim/gtk/util.py
- pyproject.toml


Changes:

=====================================
gajim/gtk/advanced_config.py
=====================================
@@ -225,9 +225,9 @@ def _fill_model(self) -> None:
                 continue
 
             for setting in settings:
-                value = app.settings.get(setting)
+                value = app.settings.get(setting)  # pyright: ignore
                 default = APP_SETTINGS[setting]
-                is_default = bool(value == default)
+                is_default = bool(value == default)  # pyright: ignore
 
                 if isinstance(value, bool):
                     value = BOOL_DICT[value]


=====================================
gajim/gtk/exception.py
=====================================
@@ -220,7 +220,7 @@ def _init_sentry(self, endpoint: str) -> None:
             default_integrations=False,
             shutdown_timeout=0,
             auto_session_tracking=False,
-            before_send=self._before_send,
+            before_send=self._before_send,  # pyright: ignore
             debug=False)
 
         sentry_sdk.set_context('os', {


=====================================
gajim/gtk/util.py
=====================================
@@ -653,7 +653,7 @@ def get_pixbuf_from_data(file_data: bytes) -> 
GdkPixbuf.Pixbuf | None:
         log.warning('loading avatar using pixbufloader failed, trying to '
                     'convert avatar image using pillow')
         try:
-            avatar = Image.open(BytesIO(file_data)).convert('RGBA')
+            avatar = Image.open(BytesIO(file_data)).convert('RGBA')  # 
pyright: ignore
             array = GLib.Bytes.new(avatar.tobytes())  # pyright: ignore
             width, height = avatar.size
             pixbuf = GdkPixbuf.Pixbuf.new_from_bytes(
@@ -707,7 +707,7 @@ def load_pixbuf(path: str | Path,
     except GLib.Error:
         try:
             with open(path, 'rb') as im_handle:
-                img = Image.open(im_handle)
+                img = Image.open(im_handle)  # pyright: ignore
                 avatar = img.convert('RGBA')
         except (NameError, OSError, UnidentifiedImageError):
             log.warning('Pillow convert failed: %s', path)


=====================================
pyproject.toml
=====================================
@@ -161,18 +161,15 @@ exclude = [
   "gajim/gtk/account_wizard.py",
   "gajim/gtk/add_contact.py",
   "gajim/gtk/adhoc.py",
-  "gajim/gtk/advanced_config.py",
   "gajim/gtk/component_search.py",
   "gajim/gtk/dataform.py",
   "gajim/gtk/discovery.py",
-  "gajim/gtk/exception.py",
   "gajim/gtk/filetransfer.py",
   "gajim/gtk/groupchat_info.py",
   "gajim/gtk/server_info.py",
   "gajim/gtk/settings.py",
   "gajim/gtk/start_chat.py",
   "gajim/gtk/types.py",
-  "gajim/gtk/util.py",
   "gajim/gtk/vcard_grid.py",
   "gajim/gui_interface.py",
   "gajim/plugins/pluginmanager.py",



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

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


_______________________________________________
Commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to