瀏覽代碼

Drop getattr masking of the base-class _reaction_handler

The attribute is declared on BasePlatformAdapter (base.py:3017) with a
None default, so it is always present. Direct access is typed and matches
the AGENTS.md typed-access rule; the getattr fallback only hid that.
Paul Klumpp 1 周之前
父節點
當前提交
87eb501e31
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      adapter.py

+ 1 - 1
adapter.py

@@ -1536,7 +1536,7 @@ class ChattoAdapter(BasePlatformAdapter):
         if not payload.room_id or not payload.message_event_id or not actor_id:
             return
 
-        handler = getattr(self, "_reaction_handler", None)
+        handler = self._reaction_handler
         if handler is None:
             return