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


Commits:
6d80cf3c by Philipp Hörist at 2025-02-08T22:56:08+01:00
cq: Fix type annotation

- - - - -


1 changed file:

- gajim/common/modules/util.py


Changes:

=====================================
gajim/common/modules/util.py
=====================================
@@ -13,7 +13,6 @@
 from functools import wraps
 from logging import LoggerAdapter
 
-import nbxmpp
 from nbxmpp.namespaces import Namespace
 from nbxmpp.protocol import Message
 from nbxmpp.structs import MessageProperties
@@ -51,7 +50,7 @@ def to_xs_boolean(value: bool | None) -> str:
     raise ValueError(f'Cant convert {value} to xs:boolean')
 
 
-def event_node(node: nbxmpp.Node) -> Any:
+def event_node(node: str) -> Any:
     def event_node_decorator(func: Any):
         @wraps(func)
         def func_wrapper(self: Any,
@@ -61,6 +60,8 @@ def func_wrapper(self: Any,
                          ) -> Any:
             if not properties.is_pubsub_event:
                 return
+
+            assert properties.pubsub_event is not None
             if properties.pubsub_event.node != node:
                 return
             func(self, _con, _stanza, properties)



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

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