From cba0e388b6dd86038ca6cbd9b80ccb3dbd668e49 Mon Sep 17 00:00:00 2001 From: Goffi Date: Sat, 4 Apr 2026 00:48:19 +0200 Subject: [PATCH] core (types): fix name conflict with `xmlstream` + docstring for `is_local`. --- libervia/backend/core/core_types.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/libervia/backend/core/core_types.py b/libervia/backend/core/core_types.py index 3b0c12ce..7cebf318 100644 --- a/libervia/backend/core/core_types.py +++ b/libervia/backend/core/core_types.py @@ -25,7 +25,7 @@ from twisted.python import failure from typing_extensions import TypedDict from twisted.words.protocols.jabber import jid as t_jid -from twisted.words.protocols.jabber import xmlstream +from twisted.words.protocols.jabber import xmlstream as mod_xmlstream from twisted.words.xish import domish from tx_xmpp import disco @@ -88,7 +88,7 @@ class SatXMPPEntity(ABC): server_jid: t_jid.JID port: int identities: list[disco.DiscoIdentity] - xmlstream: xmlstream.XmlStream + xmlstream: mod_xmlstream.XmlStream tor: "Tor | None" = None def __init__(self) -> None: @@ -168,7 +168,7 @@ class SatXMPPEntity(ABC): ## sending ## @abstractmethod - def IQ(self, type_="set", timeout=60) -> xmlstream.IQ: + def IQ(self, type_="set", timeout=60) -> mod_xmlstream.IQ: """shortcut to create an IQ element managing deferred @param type_(unicode): IQ type ('set' or 'get') @@ -335,4 +335,6 @@ class SatXMPPClient(SatXMPPEntity): class SatXMPPComponent(SatXMPPEntity): - def is_local(self, jid_: t_jid.JID) -> bool: ... + def is_local(self, jid_: t_jid.JID) -> bool: + """Returns True if jid_ use a domain or subdomain of component's host""" + raise NotImplementedError