home · contact · privacy
With .log a lambda to "or True", no need to check non-boolean returns.
authorChristian Heller <c.heller@plomlompom.de>
Sun, 10 Aug 2025 12:52:29 +0000 (14:52 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Sun, 10 Aug 2025 12:52:29 +0000 (14:52 +0200)
ircplom/client_tui.py

index f29317d9c7457fba9c2ca792ddb71619c7864ff4..7274bca89e7b6085bbd83f50eee00123cdd53da2 100644 (file)
@@ -147,15 +147,13 @@ class ClientTui(BaseTui):
         return super()._log_target_wins(**kwargs)
 
     def for_client_do(self, client_id: str, todo: str, **kwargs) -> None:
-        'Forward todo to appropriate _ClientWindowManager.'
+        'Forward todo to appropriate _ClientWindowsManager.'
         if client_id not in self._client_mngrs:
             self._client_mngrs[client_id] = _ClientWindowsManager(
                 client_id=client_id, tui_log=self._targeted_log,
                 new_window=lambda cls, **kw: self._new_window(
                     cls, _q_out=self._q_out, client_id=client_id, **kw))
-        client_data = self._client_mngrs[client_id]
-        method = getattr(client_data, todo)
-        if method(**kwargs) or signature(method).return_annotation is None:
+        if getattr(self._client_mngrs[client_id], todo)(**kwargs):
             self.redraw_affected()
 
     def cmd__connect(self,