From: Christian Heller Date: Thu, 4 Sep 2025 01:55:26 +0000 (+0200) Subject: Minor code reorganization. X-Git-Url: https://plomlompom.com/repos/balance?a=commitdiff_plain;h=d2aa47824d52af9c2c72b0a59ac22cb4a5686315;p=ircplom Minor code reorganization. --- diff --git a/ircplom/client.py b/ircplom/client.py index 86c765f..f12ed8e 100644 --- a/ircplom/client.py +++ b/ircplom/client.py @@ -274,6 +274,12 @@ class ServerCapability: enabled: bool = False +class Topic(NamedTuple): + 'Collects both setter and content of channel topic.' + what: str = '' + who: Optional[NickUserHost] = None + + class LogScope(Enum): 'Where log messages should go.' ALL = auto() @@ -317,12 +323,6 @@ class _IrcConnection(BaseIrcConnection, _ClientIdMixin): client_id=self.client_id).kw(e=e) -class Topic(NamedTuple): - 'Collects both setter and content of channel topic.' - what: str = '' - who: Optional[NickUserHost] = None - - class _CompletableTopic(_Completable): _what: str = '' _who: Optional[NickUserHost] = None @@ -438,13 +438,13 @@ class _UpdatingServerCapability(_UpdatingMixin, ServerCapability): pass -class _UpdatingTopic(_UpdatingCompletable, _CompletableTopic): +class _UpdatingCompletableTopic(_UpdatingCompletable, _CompletableTopic): pass class _UpdatingChannel(_UpdatingMixin, _Channel): user_ids: _UpdatingCompletableStringsList - topic: _UpdatingTopic + topic: _UpdatingCompletableTopic class _UpdatingNickUserHost(_UpdatingMixin, _NickUserHost):