From: Christian Heller Date: Tue, 5 Aug 2025 04:10:03 +0000 (+0200) Subject: Minor code style improvements. X-Git-Url: https://plomlompom.com/repos/booking/condition_descriptions?a=commitdiff_plain;h=f7d51f851d4ef72e7b5340e622b713d50e8193a0;p=ircplom Minor code style improvements. --- diff --git a/ircplom/client_tui.py b/ircplom/client_tui.py index 6d0b5c7..368fd58 100644 --- a/ircplom/client_tui.py +++ b/ircplom/client_tui.py @@ -201,5 +201,5 @@ class _ClientKnowingTui(Client): def update_login(self, nick_confirmed: bool, nickname: str = '') -> None: super().update_login(nick_confirmed, nickname) - self._cput(_ClientPromptEvent, payload=(self.nick_confirmed, - self.conn_setup.nickname)) + self._cput(_ClientPromptEvent, + payload=(self.nick_confirmed, self.conn_setup.nickname)) diff --git a/ircplom/events.py b/ircplom/events.py index 85f617c..7e96a50 100644 --- a/ircplom/events.py +++ b/ircplom/events.py @@ -24,7 +24,11 @@ class AffectiveEvent(Event, ABC): @classmethod def make_subtype(cls: Any, method_to_call: str, **kwargs): - 'Return subclass whose .affect calls method_to_call on target, kwargs.' + '''Return subclass whose .affect calls target.method_to_call(**kwargs). + + This will often be more convenient than a full subclass definition, + which mostly only matters for what the main loop gotta differentiate. + ''' class _AdaptedEvent(cls): def affect(self, target) -> None: getattr(target, method_to_call)(**kwargs)