Преглед изворни кода

Rename _require_client to _require_chatto_client

Aligns the exception-flavoured variant with its sibling
_get_chatto_client — both names now say which client they hand out.
Paul Klumpp пре 1 недеља
родитељ
комит
88f0fd6fbf
1 измењених фајлова са 3 додато и 3 уклоњено
  1. 3 3
      adapter.py

+ 3 - 3
adapter.py

@@ -359,7 +359,7 @@ class ChattoAdapter(BasePlatformAdapter):
                 logger.error("Chatto: failed to create client: %s", e)
                 return None
 
-    async def _require_client(self) -> ChattoClient:
+    async def _require_chatto_client(self) -> ChattoClient:
         """Return a ChattoClient or raise RuntimeError if unavailable.
 
         The exception-flavoured variant of :meth:`_get_chatto_client`, for
@@ -928,7 +928,7 @@ class ChattoAdapter(BasePlatformAdapter):
 
     async def _dispatch_message_posted(self, payload: MessagePostedPayload) -> None:
         # Respond-room gate first: read-only memberships must not cost a
-        # single API call, so this runs before fetch_message and _require_client.
+        # single API call, so this runs before fetch_message and _get_chatto_client.
         if not self._is_respond_room(payload.room_id):
             logger.debug(
                 "Chatto: message from read-only room %s ignored", payload.room_id
@@ -1385,7 +1385,7 @@ class ChattoAdapter(BasePlatformAdapter):
         delay = ChattoConstants.WS_RECONNECT_INITIAL_BACKOFF
         while not self._closing:
             try:
-                client = await self._require_client()
+                client = await self._require_chatto_client()
 
                 await self._refresh_rooms()
                 logger.info(