From 9aec497c411b9d535e8845593c77fa686d9fc12f Mon Sep 17 00:00:00 2001 From: Elliot <3186037+elliot-100@users.noreply.github.com> Date: Sat, 8 Jun 2024 21:52:21 +0100 Subject: [PATCH] fix: docstrings in spond.send_message() are incorrect for optional params. Also added corresponding type hints --- spond/spond.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/spond/spond.py b/spond/spond.py index f0df15f..8dbf0b5 100644 --- a/spond/spond.py +++ b/spond/spond.py @@ -150,7 +150,13 @@ async def _continue_chat(self, chat_id: str, text: str): return await r.json() @_SpondBase.require_authentication - async def send_message(self, text: str, user=None, group_uid=None, chat_id=None): + async def send_message( + self, + text: str, + user: Optional[str] = None, + group_uid: Optional[str] = None, + chat_id: Optional[str] = None, + ): """ Start a new chat or continue an existing one. @@ -159,14 +165,14 @@ async def send_message(self, text: str, user=None, group_uid=None, chat_id=None) Parameters ---------- - text: str + text : str Message to send - user : str + user : str, optional Identifier to match against member/guardian's id, email, full name, or profile id. - group_uid : str + group_uid : str, optional UID of the group. - chat_id : str + chat_id : str, optional Identifier of the chat. Returns