From b2f5f2686c87adae932525046a11db578226ce13 Mon Sep 17 00:00:00 2001 From: lduchosal Date: Tue, 12 May 2026 07:27:45 +0200 Subject: [PATCH] fix(types): make buildProtocol addr param Optional to satisfy LSP Twisted's Factory.buildProtocol declares addr as IAddress | None. The override must accept the same type to avoid mypy LSP violation. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/xp/services/protocol/conbus_event_protocol.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xp/services/protocol/conbus_event_protocol.py b/src/xp/services/protocol/conbus_event_protocol.py index 60d1859..630fc4c 100644 --- a/src/xp/services/protocol/conbus_event_protocol.py +++ b/src/xp/services/protocol/conbus_event_protocol.py @@ -378,7 +378,7 @@ def call_later( """ return self._reactor.callLater(delay, callable_action, *args, **kw) - def buildProtocol(self, addr: IAddress) -> protocol.Protocol: + def buildProtocol(self, addr: Optional[IAddress]) -> protocol.Protocol: """ Build protocol instance for connection.