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


Commits:
b4c45a51 by Philipp Hörist at 2025-02-16T20:01:37+01:00
cq: Remove unnecessary ignore comments

- - - - -
a44ce76d by Philipp Hörist at 2025-02-16T20:02:06+01:00
cq: ChatListRow: Reformat with black

- - - - -


4 changed files:

- .pre-commit-config.yaml
- gajim/common/types.py
- gajim/common/util/image.py
- gajim/gtk/chat_list_row.py


Changes:

=====================================
.pre-commit-config.yaml
=====================================
@@ -14,7 +14,7 @@ repos:
         - tomli
 
   - repo: https://github.com/RobertCraigie/pyright-python
-    rev: v1.1.382
+    rev: v1.1.394
     hooks:
     - id: pyright
       pass_filenames: false


=====================================
gajim/common/types.py
=====================================
@@ -39,11 +39,11 @@
                 GroupchatContact |
                 GroupchatParticipant)
 
-PluginManagerT = Union['PluginManager']  # type: ignore
-PluginRepositoryT = Union['PluginRepository']  # type: ignore
+PluginManagerT = Union['PluginManager']
+PluginRepositoryT = Union['PluginRepository']
 
-ConnectionT = Union['Client']  # type: ignore
-CSSConfigT = Union['CSSConfig']  # type: ignore
+ConnectionT = Union['Client']
+CSSConfigT = Union['CSSConfig']
 
 # PEP
 PEPNotifyCallback = Callable[[nbxmpp.JID, nbxmpp.Node], None]
@@ -53,7 +53,7 @@
 PluginExtensionPoints = dict[str, tuple[Callable[..., None] | None,
                                         Callable[..., None] | None]]
 
-SettingsT = Union['Settings']  # type: ignore
+SettingsT = Union['Settings']
 
 BookmarksDict = dict[JID, BookmarkData]
 
@@ -62,9 +62,9 @@
 AnyCallableT = Callable[..., Any]
 ObservableCbDict = dict[str, list[weakref.WeakMethod[AnyCallableT]]]
 
-BareContactT = Union['BareContact']  # type: ignore
+BareContactT = Union['BareContact']
 ChatContactT = Union['BareContact', 'GroupchatContact', 'GroupchatParticipant']
 OneOnOneContactT = Union['BareContact', 'GroupchatParticipant']
-GroupchatContactT = Union['GroupchatContact']  # type: ignore
+GroupchatContactT = Union['GroupchatContact']
 
 PresenceShowT = PresenceShowExt | PresenceShow


=====================================
gajim/common/util/image.py
=====================================
@@ -286,7 +286,7 @@ def extract_and_resize_frames_from_gif(
 
             if not image.getpalette():
                 assert palette is not None
-                image.putpalette(palette)  # type: ignore
+                image.putpalette(palette)
 
             new_frame = Image.new('RGBA', image.size)
 
@@ -322,7 +322,7 @@ def analyse_gif_image(
     before processing all frames.
     '''
 
-    duration = cast(int, image.info.get('duration', 0))  # type: ignore
+    duration = cast(int, image.info.get('duration', 0))
     result = {
         'size': image.size,
         'mode': 'full',
@@ -331,9 +331,9 @@ def analyse_gif_image(
 
     try:
         while True:
-            if image.tile:  # type: ignore
-                tile = image.tile[0]  # type: ignore
-                update_region = tile[1]  # type: ignore
+            if image.tile:
+                tile = image.tile[0]
+                update_region = tile[1]
                 update_region_dimensions = update_region[2:]  # type: ignore
                 if update_region_dimensions != image.size:
                     result['mode'] = 'partial'


=====================================
gajim/gtk/chat_list_row.py
=====================================
@@ -508,7 +508,7 @@ def _on_drag_begin(self, _drag_source: Gtk.DragSource, 
drag: Gdk.Drag) -> None:
             drag,
             Gtk.WidgetPaintable().new(self),
             int(self._drag_hotspot_x),
-            int(self._drag_hotspot_y)
+            int(self._drag_hotspot_y),
         )
 
         app.window.highlight_dnd_targets(self, True)



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/compare/335c4a43d954db23d61cc0f7b9ac7b660ef161eb...a44ce76dffbe1fbe07fbde2b3830f0c38c43fed1

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/compare/335c4a43d954db23d61cc0f7b9ac7b660ef161eb...a44ce76dffbe1fbe07fbde2b3830f0c38c43fed1
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