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


Commits:
e63c572b by Philipp Hörist at 2025-03-10T16:44:36+01:00
cq: Iq: Improve type hints

- - - - -


2 changed files:

- gajim/common/modules/iq.py
- pyproject.toml


Changes:

=====================================
gajim/common/modules/iq.py
=====================================
@@ -40,6 +40,7 @@ def _iq_error_received(self,
         if properties.error.condition in ('jid-malformed',
                                           'forbidden',
                                           'not-acceptable'):
+            assert properties.id is not None
             sid = self._get_sid(properties.id)
             file_props = FilesProp.getFileProp(self._account, sid)
             if file_props:
@@ -47,6 +48,8 @@ def _iq_error_received(self,
                     file_props.error = -3
                 else:
                     file_props.error = -4
+
+                assert properties.jid is not None
                 app.ged.raise_event(
                     FileRequestError(
                         conn=self._con,
@@ -58,6 +61,7 @@ def _iq_error_received(self,
                 raise nbxmpp.NodeProcessed
 
         if properties.error.condition == 'item-not-found':
+            assert properties.id is not None
             sid = self._get_sid(properties.id)
             file_props = FilesProp.getFileProp(self._account, sid)
             if file_props:


=====================================
pyproject.toml
=====================================
@@ -121,7 +121,6 @@ exclude = [
   "gajim/common/modules/gateway.py",
   "gajim/common/modules/httpupload.py",
   "gajim/common/modules/ibb.py",
-  "gajim/common/modules/iq.py",
   "gajim/common/modules/jingle.py",
   "gajim/common/modules/mam.py",
   "gajim/common/modules/message.py",



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

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/e63c572b405cd7f28599c4bfcc91aa5d1e8f14c8
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