Philipp Hörist pushed to branch master at gajim / python-nbxmpp


Commits:
4c0e15d0 by lovetox at 2022-03-15T23:18:11+01:00
Client: Add type annotations

- - - - -


1 changed file:

- nbxmpp/client.py


Changes:

=====================================
nbxmpp/client.py
=====================================
@@ -16,6 +16,8 @@
 # along with this program; If not, see <http://www.gnu.org/licenses/>.
 
 import logging
+from typing import Any
+from typing import Optional
 
 from gi.repository import GLib
 
@@ -570,8 +572,13 @@ class Client(Observable):
         GLib.source_remove(self._ping_source_id)
         self._ping_source_id = None
 
-    def send_stanza(self, stanza, now=False, callback=None,
-                    timeout=None, user_data=None):
+    def send_stanza(self,
+                    stanza: Protocol,
+                    now: bool = False,
+                    callback: Optional[Any] = None,
+                    timeout: Optional[int] = None,
+                    user_data: Optional[Any] = None) -> str:
+
         if user_data is not None and not isinstance(user_data, dict):
             raise ValueError('arg user_data must be of dict type')
 



View it on GitLab: 
https://dev.gajim.org/gajim/python-nbxmpp/-/commit/4c0e15d078ae9fa6c88aa2f8599fd6bcf5146b0f

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